TableView.CompactModeFilterItems Property

Provides access to a collection of filter items displayed within a compact panel in compact mode.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.1.dll


public ObservableCollection<ICustomItem> CompactModeFilterItems { get; }

Property Value

Type Description

A collection of filter items displayed within a compact panel in compact mode.


The compact panel can display predefined filter items. When clicking a filter item, the GridControl displays only those items that meet the filter criteria. To add filters to the compact panel, pass a collection of filter items (instances of the CompactModeFilterItem class) to the TableView.CompactModeFilterItems property.


The code sample below demonstrates how to define a set of predefined filters.

<dxg:GridControl ItemsSource="{Binding Customers}">
        <dxg:TableView CompactPanelShowMode="CompactMode" SwitchToCompactModeWidth="400">
                <dxg:CompactModeFilterItem DisplayValue="All" EditValue="" />
                <dxg:CompactModeFilterItem DisplayValue="From London" EditValue="[City] = 'London'" />
                <dxg:CompactModeFilterItem DisplayValue="From Madrid" EditValue="[City] = 'Madrid'" />
                <!-- data template -->

The compact panel can display filter items in the following modes, according to the TableView.CompactFilterElementShowMode property value.


Compact panel does not display its filter items.


Compact panel displays filter items as a separate list.


Compact panel displays its filter items in a separate menu.


Compact panel merges filter items with the sort items in a single menu.

See Also