Skip to main content

Pop-up Filter Menus

  • 2 minutes to read

Overview

The filter button image in a column header invokes a pop-up filter menu.

TreeList_ExcelFilterDropdown_Animation

Note

Run the XtraTreeList demo to try out pop-up filter menus.

To disable pop-up filter menus, use the TreeList.OptionsCustomization.AllowFilter property. To disable this feature for a particular column, use the TreeListColumn.OptionsFilter.AllowFilter property.

To invoke a pop-up filter menu in code, use the TreeList.ShowFilterPopup method. The TreeList.ColumnFilterChanged event fires when a column’s filter changes.

Styles: Excel and Classic

Pop-up filter menus support two styles:

  • Excel — the menu contains two tab: a value checklist and data-specific . See Excel Style for more information.

    TreeList_PopupFilterMenu_Excel

  • Classic — the menu contains a value list or a calendar depending on the data type. See Classic Style for more information.

    TreeList_PopupFilterMenu_Classic

To specify the menu style:

Filter Modes

The TreeList.OptionsFilter.FilterMode property specifies whether to show only the filtered nodes or also show their parent and child nodes. You can also hide nodes that have parents that do not match the filter criteria. The following modes are available:

Mode

Description

Default

Equivalent to ‘ParentBranch’ mode.

EntireBranch

Shows parent and child nodes that do not fit the filter.

image

ParentBranch

Shows nodes that match the filter along with node parents (even if they do not fit the filter).

TreeList_FilterMode_Extended

ParentsMatch

Shows nodes if they and all their parents match the filter.

If a node fits the filter but any of its parents does not, the node is not displayed.

Matches

Shows only those nodes that match the filter. If a node is collapsed, its children are hidden even if they match the current filter. Enable the TreeListOptionsFilter.ExpandNodesOnFiltering option to automatically expand collapsed nodes before filtration.

Extended

Obsolete; equivalent to ParentBranch.

Smart

Obsolete; equivalent to Matches.

Standard

Obsolete; equivalent to ParentsMatch.

Note

Try out filter modes on the Filter Options tab in the XtraTreeList demo.

See Also