Skip to main content

CalculatedField.Expression Property

Gets or sets the expression of the calculated field.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.2.Core.dll

Declaration

[DefaultValue(null)]
public string Expression { get; set; }

Property Value

Type Default Description
String null

A String that specifies the calculated field’s expression.

Remarks

To specify the calculated field’s name, use the CalculatedField.Name property.

The dashboard control supports criteria language for building expressions. See Expression Constants, Operators, and Functions to learn the expression syntax.

Note

To specify the type of the calculated field, insert the required conversion function (such as ToStr, ToDecimal, ToInt, etc.) into the calculated field’s expression (the Expression property). For instance, the following expression contains the ToDecimal conversion function used to specify the field type:

ToDecimal([UnitPrice] * (1 - [Discount]))

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Expression property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also