|
|
|
|
|
|
---|---|---|---|---|---|
Sun | Star | 1,989,100,000.00 | 696,000.00 | 1,412,000,000.00 | 274.00 |
The DevExpress Blazor TreeList allows you to filter data against every data source field, including fields not displayed within the TreeList. The FilterTreeMode property specifies how the TreeList component displays filtered nodes:
EntireBranch
— The component displays a node that meets the filter criteria and all its parent and child nodes, even if they do not meet the criteria.Nodes
— The component ignores parent-child relationships and displays all nodes that meet the filter criteria at one level.ParentBranch
— The component displays a node that meets the filter criteria and all its parent nodes, even if they do not meet the criteria.Auto
(default) — The filter tree mode depends on the bound data source. When bound to a GridDevExtremeDataSource<T>, the TreeList component switches to theNodes
mode to improve performance. In other data binding scenarios, the TreeList operates inParentBranch
mode.
To filter data, create a criteria operator object that specifies a filter expression. Send this object to the SetFilterCriteria method. Once you call this method, the TreeList clears all filters applied previously.
You can apply a filter to a column without resetting an existing filter. Pass a criteria operator object to the SetFieldFilterCriteria method to apply the filter to a specific data field. This method uses the AND operator to combine filters for different columns.
Call the following methods to obtain currently applied filters:
- GetFilterCriteria — Returns the criteria operator applied to the TreeList.
- GetFieldFilterCriteria — Returns the criteria operator applied to a specified data field.
To react to filter criteria changes, handle the FilterCriteriaChanged event.
This demo creates a criteria operator object based on the current value of the tag box. The SetFieldFilterCriteria method is called to apply the criteria operator to the Type column.