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

Ho to maintian GridGroupingControl vertical scroll-bar position on postback

Hello,

In my GridGropingControl  I have a vertical scroll  and I'm using  PostBackOnFocusedChanged="True"  so I can perform some server side operations on the OnSelectedRecordsChanged event.
My problem is that the GridGropingControl  scroll bar returns to the top after the OnSelectedRecordsChanged event and the user needs to manually scroll down to find his selection.

How can I maintain the vertical scroll-bar position after postback?

thanks


1 Reply

KB Kalaiarasan B Syncfusion Team August 6, 2012 12:25 PM UTC

Hi Assaf,

 You can handle the VScrollBar.ValueChanged event of the grid, in which you can get the current scroll position through the GetCurrentVScrollPixelPos() method. This event gets triggered, whenever the pixelvalue changes for the vertical scrollbar. You can also get the total height of the rows in pixel (or) the maximum pixel value through the GetVScrollPixelHeight() method and through the GetVScrollPixelMinimum() for minimum.

 Please make sure you have set the below properties,

 this.gridGroupingControl.TableControl.VScrollPixel = true;

this.gridGroupingControl.TableControl.VScrollBehavior = GridScrollbarMode.Automatic | GridScrollbarMode.AutoScroll;

 Let me know if you need any further help.

 Thanks,

Kalai


Loader.
Live Chat Icon For mobile
Up arrow icon