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.
Unfortunately, activation email could not send to your email. Please try again.

Losing update on Parent Row

Thread ID:

Created:

Updated:

Platform:

Replies:

36863 Nov 11,2005 04:31 AM Nov 11,2005 06:07 AM Windows Forms 2
loading
Tags: Grouping
Theo Danzfuss
Asked On November 11, 2005 04:31 AM

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

Administrator [Syncfusion]
Replied On November 11, 2005 06:05 AM

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?

Administrator [Syncfusion]
Replied On November 11, 2005 06:07 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;