DataViewBase.FilterEditorShowOperandTypeIcon Property

Gets or sets whether the operand's value can be swapped. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

Declaration

public bool FilterEditorShowOperandTypeIcon { get; set; }
Public Property FilterEditorShowOperandTypeIcon As Boolean

Property Value

Type Description
Boolean

true to allow end-users to swap the operand's value; otherwise, false.

Remarks

Legacy Filter Editor

The FilterEditorShowOperandTypeIcon property works only in the legacy Filter Editor.

If the FilterEditorShowOperandTypeIcon property is set to true, end users can compare the values of one filter column with the values of another column. For date-time fields, predefined date constants are available to create a filter. To activate this filter mode, an end user should click the operand type icon or press CTRL + Q, and click the second value box to display the set of available options.

filtereditor_showoperandicontype

filtereditor_showoperandicontype_1

New Filter Editor

To enable a functionality similar to the FilterEditorShowOperandTypeIcon property in the new Filter Editor, handle the FilterEditorControl.QueryOperands event and set the QueryOperandsEventArgs.AllowValueOperand property to true:

<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;
    }
} 
TIP

Demo: Filter Editor - Customize Operand Values

Requires a WPF Subscription. Download

See Also