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 one record at a time with dynamically generated child table in Grid Grouping Control

Hi, 

I've a requirement to load data in child table at runtime, so I used "OnRecordExpanded" event to populate child table. So far, Grid Grouping Control displays data as expected. However, when I click to expand next record, data on previously expanded record wipes out, which is ok, but the record remains expanded. I am just looking for a way to control the behavior, so the previous record can be collapsed every time when I click on next record. I would also like to have functionality to collapse the parent record itself or just the child table when I click on "-" sign. 

I tried to implement "OnRecordCollapsed" event, however, it doesn't work as expected because child tables are populated dynamically. 

For now, I've that working by using "GridGroupingControl1.Table.CollapseAllRecords();" method call on Page_Load. So, every time all the records get collapsed but the one selected.

Any better way of doing this?


1 Reply

BM Bala Murugan A.S Syncfusion Team September 13, 2012 05:06 AM UTC

Hi TD,

Thanks for using Syncfusion Products.

The better way of collapsing records is to use CollapseAllRecords() mehtod in Page_Load event so you can use that for your requirement.

Please let us know if you have any concerns.

Regards,
Bala Murugan A.S

Loader.
Live Chat Icon For mobile
Up arrow icon