Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
Problem Sorting With Nested Lists
posted

Hello,

I have problem with sorting when there are nested lists within my XamDataGrid. 

I have the following class which has a nested list which is the same type as the collection I'm binding to.

public class Customer

{

   public string FirstName { get; set; }

   public string LastName { get; set; }

   public List<Customer> Friends { get; set; }

}

My xaml is quite simple:

<igDP:XamDataGrid DataSource="{Binding Path=Customers}" />

The fields are being auto generated, all records show up, and expanders work just how you'd expect. However, when I expand the Friends under a customer and try to sort on FirstName the entire grid is sorted, not just the Friend records I have expanded. Is there a way to make the sort on nested lists local to that list?