All docs
V20.2
20.2 (EAP/Beta)
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
You are viewing help content for pre-release software. This document and the features it describes are subject to change. Switch to the current version.

FilterEditorControl.QueryOperands Event

Allows you to customize a list of available operand types.

Namespace: DevExpress.Xpf.Core.FilteringUI

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

Declaration

public event EventHandler<QueryOperandsEventArgs> QueryOperands
Public Event QueryOperands As EventHandler(Of QueryOperandsEventArgs)

Event Data

The QueryOperands event's data class is QueryOperandsEventArgs. The following properties provide information specific to this event:

Property Description
AllowDateTimeFunctionOperand Gets or sets whether to allow users to select date-time functions in the operand menu.
AllowPropertyOperand Gets or sets whether to allow users to select properties in the operand menu.
AllowValueOperand Gets or sets whether to allow users to select values in the operand menu.
DefaultOperand Gets or sets an operand that is selected in the operand menu when users create a new filter condition.

Remarks

Run Demo: Filter Editor - Customize Operand Values

<dxg:GridControl>
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="ProductName"/>
        <dxg:GridColumn FieldName="RequiredDate"/>
        <dxg:GridColumn FieldName="ShippedDate"/>
        <dxg:GridColumn FieldName="ShipCountry"/>
        <dxg:GridColumn FieldName="ShipCity"/>
        <dxg:GridColumn FieldName="ShipAddress"/>
    </dxg:GridControl.Columns>
    <dxg:GridControl.View>
        <dxg:TableView x:Name="view">
            <dxg:TableView.FilterEditorTemplate>
                <DataTemplate>
                    <dxfui:FilterEditorControl QueryOperands="FilterEditorControl_OnQueryOperands" />
                </DataTemplate>
            </dxg:TableView.FilterEditorTemplate>
        </dxg:TableView>
    </dxg:GridControl.View>
</dxg:GridControl> 
void FilterEditorControl_OnQueryOperands(object sender, QueryOperandsEventArgs e) {
    switch(e.FieldName) {
        case "RequiredDate":
        case "ShippedDate":
            e.AllowPropertyOperand = true;
            e.AllowDateTimeFunctionOperand = true;
            e.AllowValueOperand = true;
            break;
    }
} 
See Also