The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team June 29, 2006 04:30 PM UTC
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
IGIlya GolovkineJune 30, 2006 09:26 AM UTC
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