TreeNodes.Filter

Syntax

Filter: String

Parameters

text. Text used to filter a collection of nodes.

Description

The Filter property sets the text by which the nodes will be filtered.

Example

To execute this example, create the TreeList component named treeList. Add the entry box with the identifier text_filter and a button named Filter clicking which filters tree items by the text entered into the entry box:

<!--entry field container-->

<input id="filter_text" type="text" value="wwwww" />

<!--button container-->

<div id = "but"></div>

Add the button clicking which applies filter:

function filter()

 {

    text = document.getElementById("filter_text");

    treeList.getNodes().setFilter(text.value);

 }

var but = new PP.Ui.Button(

 {

    ParentNode: "but",

    Content: "Filter"

 });

but.Click.add(filter);

After executing this example an input box and a button are added on the HTML page. Clicking this button applies a filter to nodes of the TreeList component:

See also:

TreeNodes