Hi, I know that this question must have been asked a lot here in the forum , yes I couldn't find just the one suit for me.
My XamDataGrid DataSource is simply a list of objects. Each time I want to change the datasource, I simply do this:
xamDataGrid.DataSource = null;
xamDataGrid.DataSource = clients;
clients is my List as you can understand and it is the same list that was the datasource of the xamdatagrid before those lines. It's just because I have changed the objects in the list that I change the datasource as I do. But I believe that isn't the correct way.
Then what is?
To add to what Murray suggests, if you are bind DataSource to a property, make sure the class implements INotifyPropertyChanged and that the property notifies that the data has changed. For individual properties in the collection, it's a good idea to also notify of changes. Finally, if you use IBindingList or ObservableCollection for the colleciton itself, the XamDataGrid will automatically update when you add or remove items from the collection.
Thanks!
Google ObservableCollection and OnNotifyPropertyChanged
cheers
Murray