We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Save grid scroll position?

I am using a databound grid control and would like to restore the control''s scroll position after refreshing and re-populating the grid.

I have been playing with WindowScrolling events and the ScrollWindow API, but have not been successful. Any ideas?

3 Replies

AD Administrator Syncfusion Team September 26, 2006 05:51 AM UTC

Hi Nick,

Please refer the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?MessageID=40341

Thanks,
Haneef


AD Administrator Syncfusion Team September 26, 2006 09:47 PM UTC

Hi Haneef,

This works pretty well. Ideally, however, I would like to return the previous scroll position without requiring the user to select a cell. Is this possible?

Thanks,
Nick


AD Administrator Syncfusion Team September 27, 2006 11:21 AM UTC

Hi Nick,

You can get the position of vertical scroll bar using the GetCurrentVScrollPixelPos() method and set the position of vertical scroll bar using the SetCurrentVScrollPixelPos() method. Using these methods you can able to move the ScrollBar as required. Please refer to the attached sample for more details.

http://www.syncfusion.com/Support/user/uploads/Forum_40341_3Feb_RetainFocus_753962e7.zip

Let me know if this helps.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon