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.
Up arrow icon