Example of Search in ASP.NET Core Tree Grid Control

Tree Grid
Filtering
Search

This sample demonstrates the TreeGrid searching feature. In this sample, use the search box from toolbar to search TreeGrid records and the hierarchy mode of searching can be changed using property panel.

1
Planning
5Normal100
2
Plan timeline
5Normal100
3
Plan budget
5Low100
4
Allocate resources
5Critical100
5
Planning complete
1Low1
6
Design
3High86
7
Software Specification
3Normal60
8
Develop prototype
3Critical100
9
Get approval from customer
2Low100
10
Design complete
1Normal1
1 of 4 pages (35 items)
Properties
Hierarchy Mode

The TreeGrid has an option to search its content using the search method with search key as the parameter.

The tree grid supports different types of search mode through the searchSettings.hierarchyMode property.

The following are the types of search modes available in the tree grid.

  • Parent - This is the default search hierarchy mode in the tree grid. It displays a searched record with its parent records. If the searched records do not have any parent record, it displays only the searched record.
  • Child - Displays the searched record with its child record. If the searched records do not have any child record, it displays only the searched record.
  • Both - Displays the searched record with both its parent and child records. If the searched records do not have any parent and child records, it displays only the searched record.
  • None - Displays only the searched record.

In this demo, The TreeGrid toolbar provides an option to search the TreeGrid's records. The user can type the text box in the toolbar and click search button or press Enter key to perform search operation.


More information on the data binding can be found in this documentation section.

Transform your ASP.NET Core web apps today with Syncfusion® ASP.NET Core components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab