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

equal scrolling with shared scrollbars

I have 2 GridControls using a shared scroll bar. One grid is on top of the other. The top grid 1 column is exactly double the width of the bottom grids columns. So, 2 columns in the bottom correspond to the 1 column in the top grid. When I scroll, the both scroll 1 column at a time and obviously get off aligned. How do I make it so that every click of the scroll bar will scroll the bottom grid twice and the top grid only once? Thanks.

3 Replies

AD Administrator Syncfusion Team November 9, 2005 11:49 PM UTC

One way you could do something like this is to only use the scrollbar for one of the grids, say the top one. Then you can subscribe to the TopRowChanged event on this top grid. In your event handler, explicitly set the grid.TopRowIndex of the bottom grid to the appropriate value based on the value of the TopRowIndex for the top grid.


AD Administrator Syncfusion Team November 9, 2005 11:51 PM UTC

For horizontal scrolling, you can use the LeftColChanging event and the grid.LeftColIndex.


AD Administrator Syncfusion Team November 10, 2005 04:45 PM UTC

Thanks, worked perfectly. >For horizontal scrolling, you can use the LeftColChanging event and the grid.LeftColIndex.

Loader.
Live Chat Icon For mobile
Up arrow icon