DashboardSqlDataSource.CalculatedFields Property

Provides access to a data source's calculated fields.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v20.1.Core.dll

Declaration

public CalculatedFieldCollection CalculatedFields { get; }
Public ReadOnly Property CalculatedFields As CalculatedFieldCollection

Property Value

Type Description
CalculatedFieldCollection

A CalculatedFieldCollection object containing calculated fields.

Remarks

To learn more about calculated fields, see the following topics.

Examples

The following code snippet shows how to create a new calculated field based on the values of the 'UnitPrice' and 'Discount' data fields, and add it to the existing DashboardSqlDataSource.

using DevExpress.DashboardCommon;
//...

            CalculatedField priceWithDiscount = new CalculatedField("[UnitPrice] * (1 - [Discount])");
            priceWithDiscount.DataMember = "SalesPerson";
            priceWithDiscount.Name = "Price with discount";
            sqlDataSource.CalculatedFields.Add(priceWithDiscount);

Implements

See Also