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

Losing update on Parent Row

I have a Grid where only ONE parent record is allowed to be expanded at a time. To enforce this I call Table.CollapseAllRecords in my RecordExpanding event handler. This seems to work fine except in the following scenario. When a User edits the parent Record I expand the Record out of code - this causes the RecordExpanding event to fire and close other open rows, BUT I lose the update on the parent row. The value still appears in the grid, but not in the underlying DataTable? Is there any other way I can enforce Only one expanded row at a time? Calling Collapse in the Expanding event seems Counterproductive? Regards. TD

2 Replies

AD Administrator Syncfusion Team November 11, 2005 11:05 AM UTC

Instead of calling Table.CollapseAllRecords, you can just have a variable that tracks the opened record. Then you could just call Collapse on that single record instead of resetting the entire table. Does this make a difference in the problem you are seeing?


AD Administrator Syncfusion Team November 11, 2005 11:07 AM UTC

Another thing you could try is to call this.gridGroupingControl1.CurrencyManager.EndCurrentEdit(); before you collapse anything to see if that will avoid the problem as well.

Loader.
Live Chat Icon For mobile
Up arrow icon