MVVM and filtering nodes in TreeListView

2 posts, 1 answers
  1. meteorrr
    meteorrr avatar
    7 posts
    Member since:
    Mar 2008

    Posted 28 Mar 2010 Link to this post

    I'd like to know solutions how to implement filtering nodes in treelistview.
    At the moment I implemented datamodel/viewmodel but I have no idea how to implement filtering.
    My first thought was to add a bool flag in my ViewModel indicating if node should be visible or not.. but I don't know how to hide nodes/nodegroups.
    Rebuilding whole datamodel is not a good solutuion.
  2. Answer
    Miroslav avatar
    922 posts

    Posted 01 Apr 2010 Link to this post

    Hello meteorrr,

    Thanks for trying out the TreeListView. Please note that it is a CTP and major changes are expected for the Q2 release. It is best not to base any production code on it.

    Indeed filtering may be a bit tricky to implement in hierarchical data. In WPF this can be done by applying a filter to the Items collection on the TreeView (or any ItemsControl) but in Silverlight this is not possible.

    Since the Silverlight TreeView does not support built-in filtering changing the data model will be my suggestion here.

    This may sound a bit unnecessary and radical - I am building a sample project that will show how this can be done more transparently. I will follow up here when it is ready.

    Kind regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top