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.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Property Value
Type | Description |
---|---|
ObservableCollection<DevExpress.Xpf.Editors.ICustomItem> | A collection of filter items displayed within a compact panel in compact mode. |
Remarks
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:GridControl.View>
<dxg:TableView CompactPanelShowMode="CompactMode" SwitchToCompactModeWidth="400">
<dxg:TableView.CompactModeFilterItems>
<dxg:CompactModeFilterItem DisplayValue="All" EditValue="" />
<dxg:CompactModeFilterItem DisplayValue="From London" EditValue="[City] = 'London'" />
<dxg:CompactModeFilterItem DisplayValue="From Madrid" EditValue="[City] = 'Madrid'" />
</dxg:TableView.CompactModeFilterItems>
<dxg:TableView.DataRowCompactTemplate>
<!-- data template -->
</dxg:TableView.DataRowCompactTemplate>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
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. |