Filtering with Hierarchical data in rows

4 posts, 0 answers
  1. Manohar
    Manohar avatar
    18 posts
    Member since:
    Sep 2010

    Posted 17 Feb 2011 Link to this post

    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
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 22 Feb 2011 Link to this post

    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!
  3. DevCraft banner
  4. Manohar
    Manohar avatar
    18 posts
    Member since:
    Sep 2010

    Posted 24 Feb 2011 Link to this post

    Thank you, Pavel.
    I could probably work-around with the approach you have suggested.

    Thanks.
    B.Manohar
  5. Seylom
    Seylom avatar
    2 posts
    Member since:
    Dec 2012

    Posted 21 Mar 2013 Link to this post

    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.
Back to Top