TreeListView.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 TreeListView 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 TreeListView.CompactModeFilterItems
property.
The code sample below demonstrates how to define a set of predefined filters.
<dxg:GridControl ItemsSource="{Binding Employees}">
<dxg:GridControl.View>
<dxg:TreeListView CompactPanelShowMode="CompactMode" SwitchToCompactModeWidth="400">
<dxg:TreeListView.CompactModeFilterItems>
<dxg:CompactModeFilterItem DisplayValue="All" EditValue="" />
<dxg:CompactModeFilterItem DisplayValue="From London" EditValue="[City] = 'London'" />
<dxg:CompactModeFilterItem DisplayValue="From Madrid" EditValue="[City] = 'Madrid'" />
</dxg:TreeListView.CompactModeFilterItems>
<dxg:TreeListView.DataRowCompactTemplate>
<!-- data template -->
</dxg:TreeListView.DataRowCompactTemplate>
</dxg:TreeListView>
</dxg:GridControl.View>
</dxg:GridControl>
The compact panel can display filter items in the following modes, according to the TreeListView.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. |