Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
  [Collapse]Expressions
    Expression Editor
    Expression Operators, Functions, and Constants
    Implementing Custom Functions
    Member Table: Expressions
  [Expand]Behaviors
  [Expand]Application Appearance
  [Expand]Filtering UI Context
  [Expand]High DPI Support
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Menus
  [Expand]Tooltip Management
  [Expand]Saving and Restoring 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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Expressions

Specific DevExpress controls allow various criteria to be specified as string expressions. For instance, GridControl and PivotGridControl controls allow expressions to be used to implement unbound (calculated) columns. Data for these columns is calculated automatically according to the specified formula. In addition, expressions can be used to represent criteria for conditional format rules. See the information below to learn more.

Expanded Overview

An expression is a string that, when parsed and processed, evaluates some value. Expressions consist of column/field names, constants, operators, and functions. Column/field names must be wrapped with brackets. To learn more about available operators and functions, see below. The following are examples of regular expressions.

"[Quantity] * [UnitPrice] * (1 - [BonusAmount])"
"[FirstName] + ' ' + [LastName]"

Boolean expressions:

"[Country] == 'USA'"
"[OrderDate] > #8/16/1994# AND [Quantity] > 20"

Note

Expressions for unbound columns/fields can evaluate values of any type. Expressions used to create style conditions represent conditions, so they must evaluate Boolean values.

When specifying expressions in code, columns/fields are referred to by their field names. They are wrapped in square brackets. However, expressions can also be customized via the Expression Editor (at design time or by an end-user at runtime). In the Expression Editor, columns/fields are represented by their display captions, also wrapped in brackets. When closing the Expression Editor, the display captions are automatically converted to corresponding field names.

Expanded Concepts

Expanded Member Tables

How would you rate this topic?​​​​​​​