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. Image for the cookie policy date

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.
Live Chat Icon For mobile
Up arrow icon