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

Filtering with Hierarchical data in rows

3 Answers 164 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Manohar
Top achievements
Rank 1
Manohar asked on 17 Feb 2011, 11:40 PM
Hi,
Filtering in TreeListView is a very useful feature and works great in general!

I have enabled filtering on the first column (where the expander is shown) and user can set filters.
When the filter criteria matches a child node, all its higher parent nodes are shown which is good.
But, when the filter criteria matches a parent node, the result row (parent-node) is shown without the expander and its child/children nodes.

How do I make the filter results to show the parent-node with the expander so that the user can expand the node to see its child/children nodes?

Thanks.
B.Manohar

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 22 Feb 2011, 01:33 PM
Hi Manohar,

Unfortunately the answer is not simple. RadTreeListView filtering treats all items as a "flat"collection and disregards their level in hierarchy .

Although there is no clean solution to your requirement there might be a small hack  - e.g. add a property to your items - e.g. Level property . When filtering you may add a filtering condition with and/or clause to include exclude items based on their level .
The final composite filtering condition should be something like : All items that match criteria or have level ==0.

Best wishes,
Pavel Pavlov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Manohar
Top achievements
Rank 1
answered on 24 Feb 2011, 05:46 PM
Thank you, Pavel.
I could probably work-around with the approach you have suggested.

Thanks.
B.Manohar
0
Seylom
Top achievements
Rank 1
answered on 21 Mar 2013, 06:44 PM
Sorry, I know this is kind of an old thread but I have a similar problem and was wondering if the original poster has been successful at implementing the "hack". In order to be able to implement it, does it mean all filters have to be programmatically defined so as to be able to combine any possible filtering condition with the custom level==0 condition?
Thank you.
Tags
TreeListView
Asked by
Manohar
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Manohar
Top achievements
Rank 1
Seylom
Top achievements
Rank 1
Share this question
or