wpf-devexpress-dot-xpf-dot-grid-dot-dataviewbase-c17639a0.md
Gets or sets whether the operand’s value can be swapped. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool FilterEditorShowOperandTypeIcon { get; set; }
Public Property FilterEditorShowOperandTypeIcon As Boolean
| Type | Description |
|---|---|
| Boolean |
true to allow end-users to swap the operand’s value; otherwise, false.
|
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.
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;
}
}
Private Sub FilterEditorControl_OnQueryOperands(ByVal sender As Object, ByVal e As QueryOperandsEventArgs)
Select Case e.FieldName
Case "RequiredDate", "ShippedDate"
e.AllowPropertyOperand = True
e.AllowDateTimeFunctionOperand = True
e.AllowValueOperand = True
End Select
End Sub
Run Demo: Filter Editor - Customize Operand Values
See Also