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

Retrieving Changed Rows in Heirarchal grid

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

4 Replies

DB Daniel Byers February 27, 2005 08:05 PM UTC

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) ;

AD Administrator Syncfusion Team February 27, 2005 08:41 PM UTC

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

AD Administrator Syncfusion Team February 27, 2005 09:24 PM UTC

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

DB Daniel Byers February 28, 2005 02:32 AM UTC

Thanks, Clay. You da man!

Live Chat Icon For mobile
Up arrow icon