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

Smart, if the TreeList is contained in a TreeListLookUpEdit; Extended, otherwise (Standard for version 16.1 and older).

Extended

Shows parent nodes that do not fit the filter.

TreeList_FilterMode_Extended

Smart

Does not show parent nodes that do not fit the filter.

TreeList_FilterMode_Smart

EntireBranch

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

image

Standard

Nodes that match the applied filter are only displayed if their parent nodes also fit the filter.

TreeList_FilterMode_Standard

If a node fits the filter, but any of its parent nodes do not, the node is not displayed.

TreeList_FilterMode_Standard2

Note

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

See Also