How to bulk update sorted rows?

I would like to be able select some records from my grid, then do a bulk update (increment each value by 1) on a sequence number that is contained in the grid. When I use this code: foreach (SelectedRecord selRecord in this.grid.Table.SelectedRecords) it returns the Records in order of the collection. How can I get the records in the displayed order and loop through them?

2 Replies

AD Administrator Syncfusion Team June 26, 2006 10:23 PM UTC

Hi Martin, To get the records in the displayed order of the the grid, You need to use the DisplayElementInTableCollection . Here is a code snippet. foreach(Element el in this.gridGroupingControl1.Table.DisplayElements) { if( el.Kind == DisplayElementKind.Record) { Record rec = el.ParentRecord; Console.WriteLine(el.ParentRecord.Info ); } } Let me know if this helps. Best Regards, Haneef


MN Martin Nitschke June 27, 2006 08:37 PM UTC

yes, works great. I tried it yesterday but didn''t do the "kind" check. Thanks!

Loader.
Up arrow icon