Filter API

 
Name Type Mass, 1021 × kg Radius, km Volume, 109 × km3 Gravity, m/s2
Sun
Star 1,989,100,000.00 696,000.00 1,412,000,000.00 274.00
Data grid with 1 rows and 6 columns

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:

  • ParentBranch (Default) — The component displays a node that meets the filter criteria and all its parent nodes, even if they do not meet the criteria.
  • 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.

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:

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.