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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Linking the scrollbars of two grid controls

Thread ID:

Created:

Updated:

Platform:

Replies:

8236 Oct 28,2003 08:54 PM UTC Oct 28,2003 09:47 PM UTC WinForms 1
loading
Tags: GridControl
Cathy Noakes
Asked On October 28, 2003 08:54 PM UTC

I have two grid controls in a form and I want to link the scrollbars so that the scrollbar on the second is hidden and the scrollbar on the first controls both. I looked at the ScrollBars sample under QuickStart and tried to pattern my code after the code for using a detached scrollbar. Basically, gridControl1 has the vscrollbehavior set to automatic and gridControl2 has it set to shared. Then I tried to set: gridControl2.VScrollBar.InnerScrollBar = gridControl1.VScrollBar.InnerScrollBar; This does not do the trick. Is there a way to do what I want? I appreciate your help, Cathy

Administrator [Syncfusion]
Replied On October 28, 2003 09:47 PM UTC

Hook the detached scrollbar to one of your grids, and hide the scrollbars on the other. Handle the TopRowChanged event for the scrollbar grid, and in your handler, set the other grid's TopRowIndex to be the same as the scrollbar grid's TopRowIndex. This will make the single scrollbar 'drive' both grids.

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.

Warning Icon 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.Close Icon

;