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.
Syncfusion Feedback

GridGroupingControl: grouped columns state

Thread ID:

Created:

Updated:

Platform:

Replies:

45865 Jun 29,2006 11:32 AM Jun 30,2006 05:26 AM Windows Forms 2
loading
Tags: GridControl
Ilya Golovkine
Asked On June 29, 2006 11:32 AM

I''m using GridGroupingControl to which i bind a BindingList. It is then grouped by several columns. The question i have is how to preserve the state of the grouped columns (ie whether they are expanded or collapsed) when i refresh the list? Thanks in advance

Administrator [Syncfusion]
Replied On June 29, 2006 12:30 PM

Hi Golovkine, You can use the GroupExpanded and GroupCollapsed events to save the status ( i.e., expanded or collapsed ) by saving the record index in a hashtable before the change. And after the change the list( i.e., Rows or columns added ), you could try expanding the required records depend on the mappings in the hashtable. You can expand or collapse a particular Group by using this code snippet this.gridGroupingControl1.Table.Records[5].ParentGroup.IsExpanded = true; In order to access a particular group record, you can follow this sample code snippet. int cnt = this.gridGroupingControl1.Table.TopLevelGroup.Groups["row6 col1"].Records.Count; Record f = this.gridGroupingControl1.Table.TopLevelGroup.Groups["row6 col1"].Records[0]; Record l = this.gridGroupingControl1.Table.TopLevelGroup.Groups["row6 col1"].Records[cnt-1]; For more details, please refer to our Evalution center http://www.syncfusion.com/support/EvaluationCenter/default.aspx?cNode=5 =>GridGroupingControl Groups & Records Let us know if this helps Regards, Haneef

Ilya Golovkine
Replied On June 30, 2006 05:26 AM

Thanks a lot that works >Hi Golovkine, > >You can use the GroupExpanded and GroupCollapsed events to save the status ( i.e., expanded or collapsed ) by saving the record index in a hashtable before the change. And after the change the list( i.e., Rows or columns added ), you could try expanding the required records depend on the mappings in the hashtable. > >You can expand or collapse a particular Group by using this code snippet > >this.gridGroupingControl1.Table.Records[5].ParentGroup.IsExpanded = true; > >In order to access a particular group record, you can follow this sample code snippet. > >int cnt = this.gridGroupingControl1.Table.TopLevelGroup.Groups["row6 col1"].Records.Count; >Record f = this.gridGroupingControl1.Table.TopLevelGroup.Groups["row6 col1"].Records[0]; >Record l = this.gridGroupingControl1.Table.TopLevelGroup.Groups["row6 col1"].Records[cnt-1]; > >For more details, please refer to our Evalution center http://www.syncfusion.com/support/EvaluationCenter/default.aspx?cNode=5 =>GridGroupingControl Groups & Records > >Let us know if this helps >Regards, >Haneef

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.

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

;