Hi.
I am binding a XamDataGrid to a custom collection class derived from ObservableCollection. The child data items implement INotifyPropertyChanged.
If the collection implements IBindingList, the property update notifications are not working, so if a property on one of the data items is changed, the grid does not show the change until you force ti to re-fetch the property by editing the cell.
If I remove the IBindingList from the custom collection, the updates work correctly.
It seems that the grid is not subscribing to the PropertyChanged event on the data item if IBindingList is implemented by the collection.
I found someone with a similar issue in 2007 (link), but no solution was posted.
Any ideas? This would be a bit of a deal breaker...
Cheers,
Kai
That works like a charm.
Many thanks,
kai
Actually that is correct. When the grid detects that the list implements IBindingList, it expects that you will be raising the ListChanged event of the binding list with item change notifications (i.e. the overload of the ListChangedEventArgs that takes an item index and a property descriptor that indicates the property that was changed). You can however implement the IRaiseItemChangedEvents interface and return false from the RaiseItemChangedEvents property and the grid will still hook into the INotifyPropertyChanged of each item instead of relying on the ListChanged event for item change notifications. This is how other classes like the BindingSource are implemented as well.