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

Exclude A Parent Node When Filtering

1 Answer 88 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Troy
Top achievements
Rank 1
Troy asked on 23 Apr 2015, 07:28 PM

I'm wondering if it's possible to exclude parent nodes in the treelist when using a filter. For example, let's say we have the following data:

 

Animal: {
    id: 1
    parentId: null
    name: "Animal"
}
 
Dog: {
    id: 2
    parentId: 2
    name: "Dog"
}

 

When I populate a treelist with this data, I filter by the string "dog". What displays is the parent node "Animal" with the child node of "Dog". I'd like to only display the child node "Dog" since it matches my filter. Is this possible or does the parent node always have to be present?

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 27 Apr 2015, 10:39 AM

Hello Troy,

No, this is not supported. TreeList filtering is recursive and parent nodes will be preserved. Otherwise the widget will not be able to visualize the path from the root to the matched node.

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeList
Asked by
Troy
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or