Binding problem with elements already displayed when view model changes

2 posts, 0 answers
  1. Paul
    Paul avatar
    24 posts
    Member since:
    Jul 2010

    Posted 08 Aug 2011 Link to this post


    We are binding a TreeView to a hierarchical data structure from a "flate" collection.

    I have used your own examples as a starting point.
    We have chosen to render our own Check Box in the item template.

    This is all working great, and initial display of tree items works fine.


    We have a background service that is refreshing the data and updating the itmes in the TreeViews ItemsSource propertyy (the observiblecollection we are binding to)

    This service will alter a property on the Item that each tree node is bound to. The item IS raising the NotifyProperty event and we are also raising the collection changed events.

    Any items that are alreadyy expanded (and therefore in the visual tree) do not get their text updated inspite of the fact that they are bound to a property on the item that IS RAISING THE PROPERTY CHANGED event.
    Other elements in the tree view appear to be respecting the data changes so long as they are exposed visually AFTER the background service is refreshing them.

    My question is simple - is there ANY WAY that we can get the nodes in the tree to be refreshed (the text and check box states) when a background process changes their bound data item - this surely should be happening and surely should be working so long as the notify property changed event is firing. Why isn't it happening ?...

    Please help us with this...

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 11 Aug 2011 Link to this post

    Hi Paul,

    We cannot tell for sure why this doesn't work in your situation. You can send us part of your code( ViewModels and XAML) so that we could get into your situation quicker and this way be better able to assist you. Thank you for your cooperation.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
Back to Top