Get List of Sorted Items

1 posts, 0 answers
  1. Frustrated Dev
    Frustrated Dev avatar
    35 posts
    Member since:
    Oct 2006

    Posted 03 Jan 2011 Link to this post


    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? 

Back to Top