Skip to main content

Filtering

  • 3 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.

Concepts

  • Filter Dropdowns

    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.

  • Automatic Filtering Row

    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.

  • Advanced Filter Editor Dialog

    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.

  • Filtering in Code

    When you filter in code, you can create filters of any complexity, and hide nodes if desired.

Note

Filtering the data displayed in the TreeList Control does not filter the data in the data source. To obtain data source records that correspond to nodes displayed in the filtered TreeList Control, you need to manually iterate over visible nodes. Use the TreeList.GetDataRecordByNode method.

Read the following topic for additional information: How to Iterate TreeList Nodes.

Task-Based Help

Member Tables

See Also