Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ColumnView.FormatRuleExpressionEditorCreated Event

Allows you to customize the Expression Editor embedded in the Edit Formatting Rule dialog.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

[DXCategory("Behavior")]
public event FormatRuleExpressionEditorEventHandler FormatRuleExpressionEditorCreated

#Event Data

The FormatRuleExpressionEditorCreated event's data class is DevExpress.XtraGrid.Views.Base.FormatRuleExpressionEditorEventArgs.

#Remarks

If the GridOptionsMenu.ShowConditionalFormattingItem property is enabled, users can create and edit format rules at runtime. To create and modify an expression-based format rule, the user employs the embedded Expression Editor.

image

You can handle the FormatRuleExpressionEditorCreated event to customize this editor. Use the event’s IFilterEditor parameter to access and modify the Expression Editor’s settings.

#Example

The following example handles the FormatRuleExpressionEditorCreated event to present operand and operator lists as menus, instead of default comboboxes.

image

private void gridView1_FormatRuleExpressionEditorCreated(object sender, DevExpress.XtraGrid.Views.Base.FormatRuleExpressionEditorEventArgs e) {
    e.IFilterEditor.UseMenuForOperandsAndOperators = true;
}

Note

The ColumnViewOptionsFilter.DefaultFilterEditorView property specifies the default display style of the embedded Expression Editor.

See Also