This is a migrated thread and some comments may be shown as answers.

Get List of Sorted Items

0 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Frustrated Dev
Top achievements
Rank 1
Frustrated Dev asked on 03 Jan 2011, 04:28 PM
Hello,

I am using the Telerik RadGridView control in my Silverlight application. A user can sort the items in the grid when they click one of the column headings. Below the grid is a button. When the user clicks the button, I need to loop through the items in the order by which they have been sorted by. Currently, I'm trying to following:

// Attempt #1
foreach (var item in myGridView.Items)
{
  // Do stuff
}
 
// Attempt #2
foreach (var item in myGridView.ItemsSource)
{
  // Do stuff
}

Unfortunately, the order seems to be the same as when I originally bound the items to the grid. How do I programmatically get the list of entries in their sorted order? 

Thanks!

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Frustrated Dev
Top achievements
Rank 1
Share this question
or