- 2 minutes to read
Users can filter data within the Tree List control in a number of ways: in a column's filter menu, in a filter row displayed above data rows, or in a dialog that allows users to create complex filter criteria. You can also filter data in code. The help topics below describe how to filter data within the Tree List control.
Note that all DevExpress data-aware controls (Data Grid, Tree List, Vertical Grid, etc.) support similar filter UI and API. For detailed information on how to filter data in other data-aware controls, refer to the corresponding control's help topic.
The simplest end-user filtering tasks can be accomplished with Filter Drop-down Lists. These lists mimic the filtering UI implemented in Microsoft Excel. Like spreadsheets, the Tree List can display Filter Buttons within column headers. These buttons provide access to filter drop-down lists that contain unique values from corresponding columns. Simply select the desired value and the Tree List will display only those nodes that match the specified value.
The Auto Filter Row is displayed above all other nodes and allows end users to filter data by entering filter values within its cells. This row uses the same editors as those assigned to a given column, which makes data filtering much easier. You can also specify whether filtering should be applied immediately after a value is changed or only when end users press the ENTER key. An additional enhancement is the ability to filter nodes with the LIKE operator, so that users only need to enter the first few characters of their search criteria.
If you need total control over the filter condition, use the Filter Editor dialog. With this dialog, you will be able to build filter criteria of any complexity - create any number of conditions and combine them in any manner with any logical operator.
The Edit Filter button within the Filter Panel invokes the Filter Editor. You can hide this button.
When you filter in code, you can create filters of any complexity, and hide nodes if desired.