Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1865
Binding question
posted

I have a xamDataGrid bound to ObservableCollection. I am using MVVM pattern. New items are added to the ObservableCollection by an event trigger implemented in the underlying VM class.

I am using:

App.Current.Dispatcher.Invoke(new Action(() => { _tradeSummary.Add(item); }));   // _tradeSummary is the ObservableCollection

This works fine and I see the new Row added in the xamDataGrid.

However, when existing data items are changed in the ObservableCollection, I just can't get the existing rows in xamDataGrid to update. I tried using the same  App.Current.Dispatcher.Invoke() and Notify(), but didn't work.

Please help.

P.S. If I put my data in a DataTable and bind to DataView, the existing data updates fine but then then new data rows don't show in the grid.

Parents Reply Children