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
David,
I am wondering if you are using ICustomTypeDescriptor just to hide certaing fields in your grid?If that is so, you can use UnboundFields in custom FieldLayouts, manipulate Visibility property of the fields.
Alex.
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).
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