Pop-up Filter Menus
- 3 minutes to read
- How to: Enable/Disable Pop-up Filter Menus
- Styles: Excel and Classic
- Modes: Effect of Parent Nodes on Filtering
Note
Demo Run the XtraTreeList demo to see the filtering functionality in action.
How to: Enable/Disable Pop-up Filter Menus
Users can filter data in a tree list using pop-up filter menus. To disable this feature, use the TreeList.OptionsCustomization.AllowFilter
property (see TreeListOptionsCustomization.AllowFilter). To override this setting for a particular column, use the TreeListColumn.OptionsFilter.AllowFilter
property (see TreeListOptionsColumnFilter.AllowFilter).
To invoke a pop-up filter menu, click a column’s filter button . In code, use the TreeList.ShowFilterPopup method.
Styles: Excel and Classic
Pop-up filter menus support two styles.
Excel
(default) — Microsoft Excel®-inspired menus whose interface changes depending on the data type. See Excel Style for more information.Classic
— regular lists of available values. See Classic Style for more information.
To specify the menu style:
- for all tree lists in the application — use the static WindowsFormsSettings.ColumnFilterPopupMode property;
- for a selected tree list — use the
TreeList.OptionsFilter.ColumnFilterPopupMode
property (see TreeListOptionsFilter.ColumnFilterPopupMode); - for a selected column — use the
TreeListColumn.OptionsFilter.FilterPopupMode
property (see TreeListOptionsColumnFilter.FilterPopupMode)
Note
See also The Pop-up Filter Menu’s Visual Elements topic contains the table of options that affects menu appearance and behavior.
Modes: Effect of Parent Nodes on Filtering
The TreeList.OptionsFilter.FilterMode
property (see TreeListOptionsFilter.FilterMode) specifies whether to show a node that matches the current filter, regardless of whether its parent nodes also match the filter. If parent nodes should not match the filter and should not display the node, you can specify whether these parent nodes are displayed.
Mode | Description |
---|---|
| The same as:
For version 16.1 and later, the default is |
| Nodes that match the applied filter are displayed regardless of whether their parent nodes fit the filter. Unlike |
| Nodes that match the applied filter are displayed regardless of whether their parent nodes fit the filter. Unlike in |
| Nodes that match the applied filter are only displayed if their parent nodes also fit the filter. If a node fits the filter, but any of its parent nodes do not, the node is not displayed. |