Skip to main content

CalculatedField.DataMember Property

Gets or sets a data member that specifies to what query the field belongs.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

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

Property Value

Type Default Description
String null

A String value that specifies the calculated field’s data member.

Remarks

The DataMember property should be specified only for DashboardSqlDataSource and DashboardEFDataSource. The SQL and EF Data Sources can contain multiple queries and the DataMember property of a calculated field determines to what query this field belongs.

The following example shows how to specify DataMember for calculatedFieldNotWorking:

CalculatedField calculatedFieldNotWorking = new CalculatedField {
    DataMember = "DashboardSqlDataSourceQueryWithJoin",
    Name = "Calculated Field",
    Expression = "[FirstName]",
    DataType = CalculatedFieldType.String
};

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DataMember 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