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.

Ho to maintian GridGroupingControl vertical scroll-bar position on postback

Thread ID:

Created:

Updated:

Platform:

Replies:

104648 Aug 6,2012 04:34 AM Aug 6,2012 08:25 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Grouping
Assaf Magen
Asked On August 6, 2012 04:34 AM

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


Kalaiarasan B [Syncfusion]
Replied On August 6, 2012 08:25 AM

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


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.

;