Changes to ObservableCollection not reflected in Grid

2 posts, 0 answers
  1. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 04 Aug 2010 Link to this post

    I have a fairly simple scenario. A non-hierarchical grid bound to an ObservableCollection<T>. The collection resides on a ViewModel. When I load the view, the grid displays data appropriately. A seperate control on the page can force a refresh of data in the ObservableCollection. That is, the collection is cleared and repopulated with new items based on the outside criteria. When the operation completes, I see a new count in the collection, but the rendered grid is unchanged. It was my understanding that the grid would respond to events raised by an ObservableCollection and that no additional handling was necessary. I'm aware of a Rebind method on the grid, which I could call to force a rebind, but as you may be aware, knowledge of controls in a ViewModel is not appropriate. 

    Any ideas why the grid would not respond to changes in the collection? Also, if I must force this rebind using the Rebind method, what are some strategies to initiate this from the ViewModel without calling the grid directly from the ViewModel?

    Thanks...
  2. kilhoffer
    kilhoffer avatar
    40 posts
    Member since:
    May 2007

    Posted 04 Aug 2010 Link to this post

    Update: I just upgraded our version of Telerik controls to the Q2 release and the changes to the ObservableCollection seem to be working now. Not sure why it wasnt before, it's no longer an issue.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top