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.
Syncfusion Feedback

Retrieving Changed Rows in Heirarchal grid

Thread ID:

Created:

Updated:

Platform:

Replies:

25459 Feb 27,2005 02:40 PM Feb 27,2005 09:32 PM Windows Forms 4
loading
Tags: GridControl
Daniel Byers
Asked On February 27, 2005 02:40 PM

I have a GDBC with three levels of nested relations. In each level, the user is able to mark records for additional processing with a checkbox. How do I retrieve a collection of all of the changed rows for each of the heirarchies? Additionally, which event(s) do I need to hook into to track the changes as they are being made (in order to display a count of selected record for each level)? TIA

Daniel Byers
Replied On February 27, 2005 03:05 PM

This appears to work for retrieving the changed rows(is it the optimal method?). However, the EndEdit() is not writing the last changes to the buffer if my checkbox in the GDBC still has focus: gridAdDrills.CurrentCell.EndEdit() ; DataSet ds = (DataSet) gridAdDrills.DataSource ; DataView dv = new DataView(ds.Tables["BrandVariants"],"","",DataViewRowState.ModifiedCurrent) ;

Administrator [Syncfusion]
Replied On February 27, 2005 03:41 PM

The lists associated with the child tables are dynamic. They come and go when you expand and collapse the parent rows. So, one way to track the changes is to subscribe to the ListChanged event in RowExpanded and unsubscribe in RowCollapsing. A sampler way (if it serves your purposes) is to subscribe to the grid.RowSaved event. In that event, you can use the GridBoundRecordState to get information about the DataRow that changed. But it would be up to use to maintain a list of such changes for whatever purpose you need them. Here is a little sample that just displays the changes on the Console, you would need to cache the information you want to track. http://www.syncfusion.com/Support/user/uploads/GDBG_HierarchyChanges_84da9f68.zip

Administrator [Syncfusion]
Replied On February 27, 2005 04:24 PM

To end the edit on the binder, try calling gridAdDrills.Binder.EndEdit().

Daniel Byers
Replied On February 27, 2005 09:32 PM

Thanks, Clay. You da man!

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.

Warning Icon 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.Close Icon

;