HA
haneefm
Syncfusion Team
April 24, 2007 06:26 PM UTC
Hi Raj,
1. How do I get the list of Groups? Collapsed and Expanded?
>>>>>
Here is a code snippet that shows you "How to access all the groups and the records categorized under it?".
this.iterate(this.gridGroupingControl1.Table.TopLevelGroup);
public void iterate(Group g)
{
System.Diagnostics.Trace.WriteLine("GroupLevel = "+g.GroupLevel);
System.Diagnostics.Trace.WriteLine(g.Info);
foreach(Record r in g.Records)
{
System.Diagnostics.Trace.WriteLine(r.Info);
}
foreach(Group gr in g.Groups)
{
iterate(gr);
}
}
2. How can I collapse or Expand a particular group?
>>>>>
Use the IsExpanded property to expand/collapse the group in grid. Here is a code snippet to expand the toplevel group in a grid.
this.gridGroupingControl1.Table.TopLevelGroup.IsExpanded = true;
this.gridGroupingControl1.Table.TopLevelGroup.IsExpanded = false;
Best regards,
Haneef