Maintain Scroll Position (doesn't work with 'Edit.')

May 12, 2010 at 11:51 PM

When I "Edit" a line-item in a grid-view it doesn't maintain the scroll position.

If I create a postback using a button elsewhere on the page it does.

Any fix for this that I can use?  I have a grid that has thousands of entries - when one is "edited" it would be nice if the end-user didn't have to scroll back down...

(They don't want paging).

May 14, 2010 at 4:14 PM

I tried to fix this using code


Strange thing is - it works for a split second (CoolGridView refreshes, I can see the edited row at the bottom of the screen) then it zooms back up to the first row...


Any ideas?

May 27, 2010 at 7:42 PM

Are you working inside of a content management system like DotNetNuke or is this a control that is loaded into another page or control?

If DNN, I have to add the following to Page_Prerender on the control:

            DotNetNuke.Framework.AJAX.RegisterPostBackControl(<control causing postback>)


Hope this helps or at least points you in the right direction!