Invoking Expression Editor

  • 2 minutes to read

This topic describes how to invoke the Expression Editor in the GridControl and the PivotGridControl.

Invoking at Design Time


The Expression Editor is not available in the new WPF XAML Designer. For information on the difference between the old and new WPF XAML designers, refer to the Quick Actions and Smart Tags section.

Click the ColumnBase.UnboundExpression (or PivotGridField.UnboundExpression) property’s ellipsis button to invoke the expression editor at design time:


Invoking in Code

Call the DataViewBase.ShowUnboundExpressionEditor (or PivotGridControl.ShowUnboundExpressionEditor) method to invoke the expression editor in code:


The code sample below demonstrates how to create a button that allows invoking the expression editor:

<dxg:GridControl Name="gridControl">
      <dxg:GridColumn FieldName="DiscountAmount" />
   <dxg:TableView Name="view" />

<Button Command="{Binding Commands.ShowUnboundExpressionEditor, ElementName=view}" 
   CommandParameter="DiscountAmount">Show Expression Editor</Button>

Invoking at Runtime

Right-click a column to which you want to specify an expression, and select the Expression Editor… in the displayed context menu to invoke the expression editor:


The column’s context menu does not contain the Expression Editor… menu item by default. Set the ColumnBase.AllowUnboundExpressionEditor (or PivotGridField.AllowUnboundExpressionEditor) property to true to add this menu item to the context menu:

      <dxg:GridColumn FieldName="DiscountAmount" AllowUnboundExpressionEditor="True" />
See Also