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

Collapsing all records from the data grid

I am using a GridGroupingControl and a dataset datasource with multiple data tables in it. How could I cololapse all tables when my form starts?

I tried something like this:
_gridGrouping.Table.CollapseAllRecords();

but had no desired effect.

Thanks for your help.

1 Reply

AD Administrator Syncfusion Team September 7, 2006 07:35 AM UTC

Hi Konstantin,

Try this code snippet to collapse the all the table in a grid.

//Form load event.
foreach(Element el in this.grid.Table.NestedDisplayElements )
{
el.ParentChildTable.IsExpanded = false;
}

Thanks,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon