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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





35773 Oct 10,2005 04:32 AM UTC Oct 10,2005 10:57 AM UTC WinForms 3
Tags: Grouping
Administrator [Syncfusion]
Asked On October 10, 2005 04:32 AM UTC

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

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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.


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon