Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
535
Synchronised scrollbars
posted

Good day everyone,

 I have a form with 2 ultragrids on them. The left grid has its scrollbars hidden. Now I want the right grid to lead the left grid along. So if I move the scrollbar on the right grid I want the left grid to follow.

 Now I know this has been answered before, and I followed that solution. Here is a snippet of my code:

Public Sub AfterScrollRegionChanged(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.RowScrollRegionEventArgs) Handles MultiLayerGrid1.AfterRegionScrolled

UltraGrid1.ActiveRowScrollRegion.ScrollPosition = e.RowScrollRegion.ScrollPosition

End Sub

 

Ultragrid1 is my left grid and MultiLayerGrid1 is my center grid. This solution works HOWEVER the left grid is slower then my right grid. So when I scroll the left grid is always a step behind. So I tried to use the:

Public Sub BeforeScrollRegionChanged(ByVal sender As System.Object, ByVal e As BeforeRowRegionScrollEventArgs) Handles MultiLayerGrid1.BeforeRegionScrolled

UltraGrid1.ActiveRowScrollRegion.ScrollPosition = e.NewState.ScrollPosition

End Sub

 

But it has no effect.

 Is it even possible to have the two grids synchronised completely ? The behaviour is simply not acceptable at the moment.

Thanks for any help in advance,

 Lunaios