I am having a problem with my data updating in the grid. I have a ViewModel that has an ObservableCollection presented to the grid. DataSource property.
When the underlying data changes I update the bound observable collection, but the result are not reflected on the DataGrid. One such dynamic field only updates when I scroll, but what about added records? This is data from a trasactional system and I need new records updated.
I do have the apropriate INotifyPropertyChanged interfaces on the apropriate objects...
Hello,
Generally, the only thing you need is the INotifyPropertyChanged interface implemented on the underlying class for the XamDataGrid to update properly. This sounds like an issue that we have fixed.
Please give us the exact dll versions of the dll's that you are using. If you are using the RTM version, please download the latest service release. You can also try replacing the ObservableCollection with a BindingList collection, as I said, there were some issues with ObservableCollection.
I am using the latest service release for 9.1 and I have use tested the functionality. The probelm seams to be WHEN the updates hapen. All my fields are read only, and they are updated from the source system. When the Model detects updated data from the database it then updates itself and raises raises either a Add, Update or delete operation to all of its Subscribers.
This is when the grid does not update dynamicaly! The new data is not displayed untill you do a reorder or chnage the filter. How can this be fired automaticaly when the data source is updated.
The Grid is bound to an ObservableCollection that is part of the ViewModel which subscribes to updated from the Model. When the Model is updated the ViewModel as a subscriber, recieves these notifications and updates its ObservableCollection with the data.
:(
If you rebind the XamDataGrid, it will display the new modified data correctly. However, I cannot really say where the problem might be coming from, because we had issues like this but we have resolved them.
If you can provide a sample project we can look into it and see what is causing this.
You can download the source code from http://cid-57599e234f1ebc1c.skydrive.live.com/self.aspx/Public/Projects/WpfHeatItsmDashboard.rar
I am afrade I can't offer access to the data ;)