The TreeView does not support server-side data filtering.
To show the default built-in filter input element, set the
filterable prop of your TreeView to
true. It is set to
false by default. Once
filterable is set to
true, the TreeView will start emitting a
filterChange event. You could then either use one of the data-binding directives, or handle the
filterChange event manually.
- Just set
trueas described above and filtering will work out of the box.
- Pass a
filterprop to the
kendoTreeViewFlatDataBindingdirective. This works even when the built-in input is not shown (
filter prop to a TreeView which both uses one of our data-binding directives, and has its
filterable prop set to
true, will result in an initial filtration being applied as soon as the component loads.
filterprop to a TreeView which does not use
kendoTreeViewFlatDataBindingwill just set an initial value to the built-in input element, but no filtering will be performed automatically.
To manually filter the TreeView component in combination with
hasChildren functions, first set its
filterable prop to
true. Once that's done, the TreeView will start emitting a
filterChange event, which is a
string containing the filter term.
The following example demonstrates a manual search function which filters the data passed to the TreeView.