Expand by one level

hi The expandall function expands untill the records are seen.I want to expand by only one level , for ex, expand all: grp1 grp2 rec expand to one level: grp1 grp2 How to do it?

1 Reply

AD Administrator Syncfusion Team July 11, 2005 01:11 PM UTC

Try setting the Group.IsExpanded property. Here is code that expands one level of groups from a button handler.
private void button1_Click(object sender, System.EventArgs e)
{
	ExpandOneLevelGroups(this.gridGroupingControl1.Table.TopLevelGroup);
}

private void ExpandOneLevelGroups(ChildTable parent)
{
	foreach(Group g in parent.Groups)
	{
		g.IsExpanded = true;
	}
}

            

Loader.
Up arrow icon