Sorted DataSource

I'm currently using version 3.3 of the GridGroupingControl, I need to retrieve a 'Sorted' copy of my original datasource. All of the methods and properties that I've found return the original datasource without sorting. The version I need is the sorted data after being sorted by the user.

This was possible with the GridDataBoundGrid, is there any way to get this?

Any help would be appreciated!

2 Replies

AD Administrator Syncfusion Team March 22, 2007 10:27 PM UTC

Hi Fred,

You can use the Table.Records property to get the collection of sorted record elements that are children of a Table. This collection contains all records, it is not filtered. The collection provides support for determining a record's position in the grouped table using the RecordsInTableCollectionBase.IndexOf method.

[c#]
foreach( Record rec in this.grid.Table.Records)
Console.Writeline( rec.Info );

Use Table.UnsortedRecords proeprty to get the collection of unsorted Record elements that are children of a Table and represent the original records in the same order as the underlying data source. The collection provides support for determining a record's underlying position in the datasource using the UnsortedRecordsCollection.IndexOf method.

[c#]
foreach( Record rec in this.grid.Table.UnsortedRecords)
Console.Writeline( rec.Info );

Best regards,
Haneef


FL Frederic Loud March 23, 2007 05:01 PM UTC

Thanks for the info, thats what I was assuming I'd end up having to do. I developed a work around using the Records Collection.

Loader.
Up arrow icon