Filtering

The built-in filtering functionality enables the user to filter the displayed DropDownTree items by their text value.

By default, filtering is disabled and can be performed over string values only, that is, either the widget data has to be an array of strings or configured in the dataTextField option over the field.

The DropDownTree supports the following filter values:

  • startswith
  • endswith
  • contains

The following example demonstrates how to set the filter of the DropDownTree.

<input id="dropdowntree"></input>

<script>
    var serviceRoot = "https://demos.telerik.com/kendo-ui/service";
    var myDataSource = new kendo.data.HierarchicalDataSource({
        transport: {
            read: {
            url: serviceRoot + "/Employees",
            dataType: "jsonp"
            }
        },
        schema: {
            model: {
            id: "EmployeeId",
            hasChildren: "HasEmployees"
            }
        }
    });

    $("#dropdowntree").kendoDropDownTree({
        filter: "startswith",
        dataSource: myDataSource,
        dataTextField: "FullName"
    });
</script>

See Also

In this article
Not finding the help you need? Improve this article