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.

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

Thread ID:





35773 Oct 10,2005 12:32 AM Oct 10,2005 06:57 AM Windows Forms 3
Tags: Grouping
Administrator [Syncfusion]
Asked On October 10, 2005 12:32 AM

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.

Administrator [Syncfusion]
Replied On October 10, 2005 04:05 AM

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

Administrator [Syncfusion]
Replied On October 10, 2005 05:35 AM

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

Administrator [Syncfusion]
Replied On October 10, 2005 06:57 AM

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.


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.

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.