PredefinedFiltersElement Class
A filter element that works with a column’s Predefined Filters.
Namespace: DevExpress.Xpf.Core.FilteringUI
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Remarks
Tip
Topic: Filter Elements
Starting from v18.2, the GridControl supports Predefined Filters. Use the ColumnBase.PredefinedFilters property to specify them:
<dxg:GridColumn FieldName="MPGCity">
<dxg:GridColumn.PredefinedFilters>
<dxfui:PredefinedFilterCollection>
<dxfui:PredefinedFilter Filter="?p >= 25" Name="More than 25" />
<dxfui:PredefinedFilter Filter="?p >= 15 AND ?p < 25" Name="From 15 to 25" />
<dxfui:PredefinedFilter Filter="?p < 15" Name="Less than 15" />
</dxfui:PredefinedFilterCollection>
</dxg:GridColumn.PredefinedFilters>
</dxg:GridColumn>
The PredefinedFiltersElement allows a user to apply a column’s predefined filters:
<dxg:GridControl x:Name="grid" ... />
<!-- ... -->
<dxfui:PredefinedFiltersElement Context="{Binding FilteringContext, ElementName=grid}" FieldName="MPGCity" />
FilterModelTemplate Property
Use the FilterElement.FilterModelTemplate property to specify the filter element template.
Tip
Data Context (Binding Source): PredefinedFiltersModel
ShowCounts Property
You can set the FilterElement.ShowCounts property to false to not show the record count next to filter values.
Inheritance
Object
DispatcherObject
DependencyObject
Visual
UIElement
FrameworkElement
Control
FilterElement
PredefinedFiltersElement
See Also