I have a datagrid which is bound to ObservableCollection<Product>
. When the grid is updated this automatically updates the Product object in my collection.
What I want to do now is to have some sort of even that is triggered when any object in the collection is updated -or- some sort of binding to the collection that will return true/false depedant on if any Product has been updated.
The overall objective is to have a save button on my main window that is disabled if no changes have been made to my collection and enabled if changes have been made.
I have read into INotifyPropertyChange
but I dont see how I can use this to monitor changes on a whole collection.
Additionally, if I implement this interface on my Product class I dont see how my UI can monitor every product in the collection - or can it?