Hello,
I was wondering if the XamDataGrid has some sort of auto-sorting turned on by default. I have an observable collection of custom row objects bound to a XamDataGrid.DataSource. When I insert a new row object at the top of the collection by calling the observable collection's Insert() method, the grid re-sorts the list so that my empty row object appears at the bottom of the list. I checked the order of the observable collection and it is correct; however, the grid display no longer matches the order of items in the collection. Note: the order of items is displayed correctly upon initially binding to the XamDataGrid.
Thanks,
David
Hi David ,
I've reproduced the scenario using WPF version 8.2 and 9.1 and it works fine to me. Could you please tell
me which version are you using and is your Row class implements some interfaces like IComparable ?
Best regards
Vlad
Hi Vlad,
I’m using version 8.2. My Row class implements the ICustomTypeDescriptor and INotifyPropertyChanged interfaces only (we’re using PropertyDescriptors to dynamically get data from our datasource collection class – so no data is actually stored in the Row class objects).