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

vertical scroll bar not moving to reflect the expanded grid element/section

Thread ID:





74289 Jun 5,2008 04:58 PM UTC Jun 10,2008 03:48 AM UTC WinForms 3
Tags: GridControl
Ricky Ling
Asked On June 5, 2008 04:58 PM UTC

In our application, we implement the gridgroupingcontrol. When we attempt to expand a section by clicking on the "+", the vertical scroll bar to the right does not move to show the user the new expanded section. The user has to manually scroll the vertical bar down to see the results after clicking the "+". Specifically, when you vertically scroll down the bar the the very bottom of your application, and the last element is a section that is expandable, if the user decides to click the plus sign, the vertical scroll bar won''t move further down all the way so the user can see things.

If you download the zip attached, which is the Hierarchy View sample taken from SyncFusion, this happens as well. Try to run this sample, scroll to the very bottom, and expand "WANDK" by clicking the plus sign. Notice you have to manually move the vertical bar yourself to see the results of the expansion.

What can we do to solve this problem? Is this a fix in later versions, as we are using What is the workaround to get this scroll bar to behave correctly in our current version?

Please let me know! Thanks.


Sri Rajan [Syncfusion]
Replied On June 6, 2008 05:35 AM UTC

Hi Richy,

Thank you for your interest in Syncfusion products.

You need to handle GroupExpanded event and call ScrollCellInView method to scroll the expanded record cell into the view. Please refer the below code for more details.

void gridGroupingControl1_GroupExpanded(object sender, GroupEventArgs e)
if (e.Group != null && e.Group.Records.Count > 0)
Record rec = e.Group.Records[e.Group.Records.Count - 1];
GridTable table = e.Group.ParentTable as GridTable;
int index = table.NestedDisplayElements.IndexOf(rec);
string tName = e.Group.ParentTableDescriptor.Name;
(sender as GridGroupingControl).GetTableControl(tName).UpdateScrollBars();
table.TableModel.ScrollCellInView(GridRangeInfo.Row(index), GridScrollCurrentCellReason.BeginEdit);

Here is the minimal sample which implements this task.

Please let me know if this helps.

Best Regards,

Ricky Ling
Replied On June 9, 2008 03:00 PM UTC

Our grid has records inside, so I am handling the OnRecordExpanded event, as opposed to the OnGroupExpanded. I have found a method which am I using now called ScrollInView(rec) which takes in a record and scrolls it into view. My implementation locates the last record and scrolls it so that it is visible to the user. However, we want to handle the case where if the user clicks on the '+' to expand the record, and if there are say 200 rows resulting, instead of showing the last 200th row, or somewhere in the middle, make the top row sit at the very top and show as much as possible regardless of whether the last rows can be seen.

Any suggestions on how to approach this case?


Sri Rajan [Syncfusion]
Replied On June 10, 2008 03:48 AM UTC

Hi Ricky,

Your Direct-Trac incident 46958 is updated. Please follow up the incident for this query.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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