Hi, (three times in a row today :-)
When my usercontrol loads, I set the ItemsSource of my xamWebGrid to an ObservableCollection.
This ObservableCollection inherits from INotifyPropertyChanged.
When I use the CellExitedEditMode event, I update my ObservableCollection. However, I don't set the ItemsSource again because otherwise I get an xaml error (because probably it loses it's active cell)
I always thought that with an ObservableCollection that uses INotifyPropertyChanged, it wasn't necessary to set the ItemsSource each time. Could there be something else that I'm missing ?
Thanks,
Nicolas
Binding scenarios can be tricky. Thanks for letting us know you found the solution.
Just in case there is any confusion, the only reason you would need to use INotifyPropertyChanged on a property that was an ObservableColection is if your code re-initializes the property with a new or different collection. Usually when I have a property that is an ObservableCollection, I instantiate it early and never swap out the collection. I simply add and remove items from the same collection. ObservableCollection itself implements INotifyCollectionChanged. This means if you add or remove items to the collection, it will send notification of the change.
Thanks again for your post!
Never mind ... found the causing issue.
I re-initialised my ObservableCollection too much so the changes got lost.