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

DataViewBase.FilterEditorTemplate Property

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

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.1.Core.dll

Declaration

public DataTemplate FilterEditorTemplate { get; set; }

Property Value

Type Description
DataTemplate

A template that defines the presentation of the Filter Editor.

Remarks

Tip

Demo: Filter Editor - Customize the Field List

Requires installation of WPF Subscription. Download

The following code sample shows how to add the ShipCountry, ShipCity, ShipAddress fields to the Ship category:

<dxg:TableView x:Name="view">
    <dxg:TableView.FilterEditorTemplate>
        <DataTemplate>
            <dxfui:FilterEditorControl QueryFields="OnQueryFields" />
        </DataTemplate>
    </dxg:TableView.FilterEditorTemplate>
</dxg:TableView>
void OnQueryFields(object sender, QueryFieldsEventArgs e) {
    var shipCountry = e.Fields["ShipCountry"];
    var shipCity = e.Fields["ShipCity"];
    var shipAddress = e.Fields["ShipAddress"];

    shipCountry.Caption = "Country";
    shipCity.Caption = "City";
    shipAddress.Caption = "Address";

    e.Fields.Remove(shipCountry);
    e.Fields.Remove(shipCity);
    e.Fields.Remove(shipAddress);

    var shipGroup = new FieldItem { Caption = "Ship" };
    shipGroup.Children.Add(shipCountry);
    shipGroup.Children.Add(shipCity);
    shipGroup.Children.Add(shipAddress);
    e.Fields.Add(shipGroup);
} 

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