Search

18 Nov 20181 minute to read

You can search records in a TreeGrid, by using the search method with search key as a parameter. This also provides an option to integrate search text box in treegrid’s toolbar by adding search item to the Toolbar.

To apply search at initial rendering, set the fields, operator, key, and ignoreCase in the SearchSettings.

NOTE

By default, treegrid searches all the bound column values. To customize this behavior define the SearchSettings.Fields property.

Search operators

The search operator can be defined in the Operators property of SearchSettings to configure specific searching.

The following operators are supported in searching:

Operator  Description
startsWith  Checks whether a value begins with the specified value.
endsWith  Checks whether a value ends with the specified value.
contains  Checks whether a value contains the specified value.
equal  Checks whether a value is equal to the specified value.
notEqual  Checks for values not equal to the specified value.

NOTE

By default, the Operators value is contains.

Search by external button

To search treegrid records from an external button, invoke the search method.

Search specific columns

By default, treegrid searches all visible columns. You can search specific columns by defining the specific column’s field names in the Fields property of SearchSettings.

NOTE

You can refer to our ASP.NET MVC Tree Grid feature tour page for its groundbreaking feature representations. You can also explore our ASP.NET MVC Tree Grid example to knows how to present and manipulate data.