[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
    Expression Editor
    Custom Functions
    Custom Function Based Filters
    Member Table: Expressions
  [Expand]Application Appearance and Skin Colors
  [Expand]Filtering UI Context
   Find Panel Syntax
  [Expand]Graphics Performance and High DPI
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML-inspired Text Formatting
  [Expand]Save and Restore Layouts
   Clipboard - Copy and Paste Operations. Data Formatting
   Version Compatibility: Default Property Values
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Expression Editor

This document describes different versions of the Expression editor available in various DevExpress products and provides an overview of the syntax that is used to create expressions.

This document consists of the following sections.

Expanded Syntax Overview

The Expression editor supports a variety of math, date-time, string and logical functions. To learn more about the supported functions, refer to Criteria Language Syntax.

The following syntax conventions should be taken into account when using the Expression editor.

  • A data field is referenced by enclosing its name in square brackets (e.g., [Products.ProductName]).
  • Query Parameters are referenced by typing a question mark before their names (e.g., ?parameter1).

    Report parameters are referenced by adding the "Parameters." prefix before their names (e.g., [Parameters.parameter1]).

  • String values are denoted with apostrophes. An attempt to use quotes instead will result in an error.

    To embed an apostrophe into an expression's text, type a double apostrophe (e.g., 'It''s sample text').

  • Date-time constants should be enclosed with hashtags (e.g., [OrderDate] >= #1/1/2016#).

  • To represent a null reference (one that does not refer to any object), use a question mark (e.g., [Region] != ?).
  • If an expression involves the use of different types, you can convert them to the same type using dedicated functions (e.g., Max(ToDecimal([Quantity]),[UnitPrice])).

To learn more, see Criteria Language Syntax.

Expanded New Expression Editor

Some of the DevExpress products are shipped with a newer version of the Expression editor that is illustrated in the following image.

These products are listed below:

This editor supports syntax highlighting and intelligent code completion (suggesting functions as you type). When selecting a function, a tooltip is invoked, displaying the function's description.

Typing a left square bracket will invoke a popup window listing all available data columns. When selecting a column, a tooltip is invoked, displaying the column's data type.

If an expression contains any errors, the editor immediately highlights them in-place, without invoking dialog windows.

Customization API

A public API for customizing the Expression Editor is available in the DevExpress.Data.Controls.ExpressionEditor and DevExpress.DataAccess.ExpressionEditor namespaces.

For a code sample, see the following example online: How to customize the Expression Editor.


You can use the ExpressionEditorUIHelper class's methods to invoke the Expression Editor in your application at runtime.

Expanded Legacy Expression Editor

The following image illustrates the older Expression editor version shipped with certain DevExpress products.

Unlike the newer version this editor does not support intelligent code completion, syntax highlighting and immediate indication of errors.

Expanded Selecting the Editor Version

To switch back your Windows Forms application to the use of the legacy Expression Editor, set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v16 at the application startup.

To learn more, see Version Compatibility: Default Property Values.

Expanded See Also

Is this topic helpful?​​​​​​​