Skip to main content

CalculatedField.DataType Property

For internal use.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

[Browsable(false)]
[DefaultValue(CalculatedFieldType.Auto)]
public CalculatedFieldType DataType { get; set; }

Property Value

Type Default
CalculatedFieldType Auto

Remarks

The type of a newly created calculated field is detected automatically based on the type of values returned by the specified expression. To change the type of the calculated field, insert the required conversion function (such as ToStr, ToDecimal, ToInt, etc.) into the calculated field’s expression (the CalculatedField.Expression property). For instance, the following expression contains the ToDecimal conversion function that is used to change the default field type:

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

Use the IDashboardDataSource.GetFieldSourceType property to get the calculated field’s type.

See Also