Skip to main content
A newer version of this page is available. .

PivotGridControl.FilterEditorTemplate Property

Gets or sets a template that defines the presentation of the Filter Element within the Filter Editor dialog. This is a dependency property.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v19.2.dll

Declaration

public DataTemplate FilterEditorTemplate { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate object.

Example

Note

The complete sample project How to Customize a Filter Editor is available in the DevExpress Examples repository.

Use the PivotGridControl.FilterEditorTemplate property to specify a custom data template. You can also use the PivotGridControl.FilterEditorDialogServiceTemplate property to modify the appearance and functionality of the window that hosts the FilterEditorControl. To customize the list of operators, handle the FilterEditorControl.QueryOperators event. The following code demonstrates how to remove all operators except Between and NotBetween:

<dxpg:PivotGridControl.FilterEditorTemplate>
    <DataTemplate>
        <dxfui:FilterEditorControl QueryOperators="FilterEditorControl_QueryOperators" />
    </DataTemplate>
</dxpg:PivotGridControl.FilterEditorTemplate>
using DevExpress.Xpf.Core.FilteringUI;
// ... 
private void FilterEditorControl_QueryOperators(object sender, FilterEditorQueryOperatorsEventArgs e)
{
    if (e.FieldName == "fieldOrderDate")
    {
        e.Operators.Clear();
        e.Operators.Add(new FilterEditorOperatorItem(FilterEditorOperatorType.Between) { Caption = "Between" });
        e.Operators.Add(new FilterEditorOperatorItem(FilterEditorOperatorType.NotBetween) { Caption = "NotBetween" });
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FilterEditorTemplate property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also