Home Forums WPF controls Xceed DataGrid for WPF View isn’t updated after DataTable updated

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23653 |

    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)

    User (Old forums)
    Member
    Post count: 23064

    A fix for this will be available in the next service release, which will be published next week:

    http://forums.xceed.com/forums/ShowPost.aspx?PostID=8086

    Thanks,

    Imported from legacy forums. Posted by Pascal (had 386 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you, I’ll wait for the next build!

    Imported from legacy forums. Posted by Nick (had 211 views)

    User (Old forums)
    Member
    Post count: 23064

    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)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.