Filtering in Code
- 2 minutes to read
To filter Tree List nodes in code, utilize the following API:
TreeList.ActiveFilterString and TreeList.ActiveFilterCriteria
Allow you to specify a string filtering expression or a CriteriaOperator object. Read the following topic for detailed information and examples: Criteria Language Syntax.
-
Disable the
Visible
property in event arguments to hide a node that does not match your custom filter criteria. Add
method of the TreeList.ActiveFilter property.Add a new filter criteria that applies filtering by a specific Tree List column.
-
Enters a predefined automatic filtering row condition.
Disable the TreeListOptionsCustomization.AllowFilter option to prevent a user from applying and changing Tree List filters at runtime.
Turn off the TreeList.ActiveFilterEnabled setting to temporarily disable applied filters.
#Example
The example below ensures that Tree List records with the 15% discount are always visible, regardless of the currently applied filtering condition.