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.
Unfortunately, activation email could not send to your email. Please try again.

Save grid scroll position?

Thread ID:

Created:

Updated:

Platform:

Replies:

49726 Sep 25,2006 03:25 PM Sep 27,2006 07:21 AM Windows Forms 3
loading
Tags: GridControl
Nick M
Asked On September 25, 2006 03:25 PM

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?

Administrator [Syncfusion]
Replied On September 26, 2006 01:51 AM

Hi Nick,

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

Thanks,
Haneef

Administrator [Syncfusion]
Replied On September 26, 2006 05:47 PM

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

Administrator [Syncfusion]
Replied On September 27, 2006 07:21 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;