Skip to main content

FilterElement.FilterModelTemplate Property

Gets or sets a template of the filter element’s model.

Namespace: DevExpress.Xpf.Core.FilteringUI

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public DataTemplate FilterModelTemplate { get; set; }

Property Value

Type Description
DataTemplate

A template of the filter element’s model.

Remarks

Checked List - Grid Template

Run Demo: Checked List - Grid Template

Code Sample
<dxfui:CheckedListFilterElement x:Name="filterElement"
                                FieldName="Country" Context="{Binding ElementName=grid, Path=FilteringContext}">
    <dxfui:CheckedListFilterElement.FilterModelTemplate>
        <DataTemplate>
            <dxg:GridControl SelectionMode="MultipleRow"
                             ItemsSource="{Binding FilterValues}" SelectedItems="{Binding SelectedFilterValuesSource}">
                <dxg:GridControl.Columns>
                    <dxg:GridColumn FieldName="Row.Flag" Header="Flag" Width="30">
                        <dxg:GridColumn.CellTemplate>
                            <DataTemplate>
                                <Image Source="{Binding Value}" HorizontalAlignment="Center" Height="20"/>
                            </DataTemplate>
                        </dxg:GridColumn.CellTemplate>
                    </dxg:GridColumn>
                    <dxg:GridColumn FieldName="Value" Width="*"/>
                    <dxg:GridColumn FieldName="Count" SortOrder="Descending" Width="60"/>
                </dxg:GridControl.Columns>
                <dxg:GridControl.View>
                    <dxg:TableView ShowCheckBoxSelectorColumn="True" CheckBoxSelectorColumnWidth="30" NavigationStyle="Row"
                                   ShowGroupPanel="False" AllowGrouping="False" ShowIndicator="False" AllowEditing="False">
                        <dxg:TableView.FormatConditions>
                            <dxg:DataBarFormatCondition FieldName="Value" Expression="[Count]" PredefinedFormatName="GreenSolidDataBar"/>
                        </dxg:TableView.FormatConditions>
                    </dxg:TableView>
                </dxg:GridControl.View>
            </dxg:GridControl>
        </DataTemplate>
    </dxfui:CheckedListFilterElement.FilterModelTemplate>
</dxfui:CheckedListFilterElement> 

Checked List - Chart Template

Run Demo: Checked List - Chart Template

Code Sample
<dxfui:CheckedListFilterElement x:Name="filterElement"
                                FieldName="Country" Context="{Binding ElementName=grid, Path=FilteringContext}"
                                ShowAllLookUpFilterValues="False">
    <dxfui:CheckedListFilterElement.FilterModelTemplate>
        <DataTemplate>
            <dxc:ChartControl DataSource="{Binding FilterValues}"
                              SelectedItems="{Binding SelectedFilterValuesSource}"
                              SelectionMode="Multiple" Padding="4">
                <dxc:ChartControl.CrosshairOptions>
                    <dxc:CrosshairOptions ShowArgumentLine="False"/>
                </dxc:ChartControl.CrosshairOptions>
                <dxc:XYDiagram2D>
                    <dxc:XYDiagram2D.AxisX>
                        <dxc:AxisX2D>
                            <dxc:AxisX2D.WholeRange>
                                <dxc:Range SideMarginsValue="1.0"/>
                            </dxc:AxisX2D.WholeRange>
                            <dxc:AxisX2D.QualitativeScaleOptions>
                                <dxc:QualitativeScaleOptions AutoGrid="False"/>
                            </dxc:AxisX2D.QualitativeScaleOptions>
                            <dxc:AxisX2D.Label>
                                <dxc:AxisLabel Angle="-90">
                                    <dxc:Axis2D.ResolveOverlappingOptions>
                                        <dxc:AxisLabelResolveOverlappingOptions AllowRotate="False" AllowStagger="False" AllowHide="False"/>
                                    </dxc:Axis2D.ResolveOverlappingOptions>
                                </dxc:AxisLabel>
                            </dxc:AxisX2D.Label>
                        </dxc:AxisX2D>
                    </dxc:XYDiagram2D.AxisX>
                    <dxc:BarSideBySideSeries2D ArgumentDataMember="Row.ActualNWindName" ValueDataMember="Count"/>
                </dxc:XYDiagram2D>
            </dxc:ChartControl>
        </DataTemplate>
    </dxfui:CheckedListFilterElement.FilterModelTemplate>
</dxfui:CheckedListFilterElement> 
See Also