I use DataTable as ItemsSource. When I update content of source DataTable, in some cases grid doesn’t update displayed values. The most simple case of them is the following: grid is not scrolled (shows top row) and I update currently displayed row. In order to make grid to update view I need to scroll grid to the bottom and scroll back. Only after that chages are taken place. I have more problems, if I click a column header to sort data. In this case some row can be cleared atall after I update source DataTable, so I should refresh DataTable again. Tests showed that I can avoid all of this problems reloading columns for each update, but I think it’s bad solution.
I use build 1.1.7273.12150. Previous build could clear all data after DataTable is updated. I guess it was because I place grid onto Tab control.
Do you have any ideas how I can fix that?
Imported from legacy forums. Posted by Nick (had 652 views)
I found a workaround, maybe it’ll be interesting to anybody.
I subscribed on DataTable ListChanged event and call DataGrid UpdateLayout method on each DataTable change. If UpdateLayout is called after making all changes in DataTable, it doesn’t help. It’s essencial to call the method on each change.
Imported from legacy forums. Posted by Nick (had 3746 views)