This is a migrated thread and some comments may be shown as answers.

MVVM and filtering nodes in TreeListView

1 Answer 104 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
meteorrr
Top achievements
Rank 1
meteorrr asked on 28 Mar 2010, 03:07 PM
Hello,
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Miroslav
Telerik team
answered on 01 Apr 2010, 12:49 PM
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,
Miroslav
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.
Tags
TreeListView
Asked by
meteorrr
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or