Custom Filtering

2 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Jan 2009

    Posted 02 Jun 2014 Link to this post


    I have applied custom filtering on the Treeview on Drop down selection change. Let's say I have applied filter to show only checked nodes and it did only showed me checked nodes. After filtering I unchecked one or more nodes but It didn't hide them so I figured that I might have to apply Filter on it again which I did but it didn't applied any filter nor did it go to the Filter Function that I have linked to it as well. Al thought it's working from UI.

    Here's my code:

    TreeView.TreeViewElement.FilterPredicate = FilterNode;

    private bool FilterNode(RadTreeNode node)
                bool filter = false;
                return filter;

    //For applying the filter

    TreeView.Filter = string.Empty;
    TreeView.Filter = "Custom";

    Let me know if that makes any sense.


  2. Dimitar
    Dimitar avatar
    2655 posts

    Posted 04 Jun 2014 Link to this post

    Hello Attiqe,

    Your question has already been answered in the support thread you have opened. Nevertheless I am copying the answer here in order the community to benefit from it:

    If you are triggering the custom filtering functionality in an event like NodeCheckedChanged you should enclose the filter reset in a Begin\End Update block. This will trigger an explicit nodes update and the filter will be applied again: 
    this.radTreeView1.Filter = "";
    this.radTreeView1.Filter = "Custom";

    If you have any questions, please do not hesitate to contact us.
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top