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

LK: retrieving the records in the sorted order of a ggc

clicking the column header of a ggc will sort the records, how do i obtain the datatable in the order it was sorted for that ggc? i know in a normal datatable, i can retrieve it using dtbl.defaultview.

3 Replies

AD Administrator Syncfusion Team October 10, 2005 08:05 AM UTC

You can iterate through the FilteredRecords collection.
foreach(GridRecord r in this.gridGroupingControl1.Table.FilteredRecords)
{
	DataRowView drv = r.GetData() as DataRowView;
}


AD Administrator Syncfusion Team October 10, 2005 09:35 AM UTC

is there any other way to obtain the list directly in dataview instead of having to loop through each individual record?


AD Administrator Syncfusion Team October 10, 2005 10:57 AM UTC

No. The grouping control does not use the dataview to do its sorting. So, sorting the grid does not sort the data in your datatable (or in any dataview). To access the data in the sort order generated by sorting the grid, you access it through the FilteredRecords collection.

Loader.
Live Chat Icon For mobile
Up arrow icon