AD
Administrator
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
IG
Ilya Golovkine
June 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