Skip to main content

ExpressionDataBinding Class

Defines a calculation based on a string expression.

Namespace: DevExpress.Web.ASPxPivotGrid

Assembly: DevExpress.Web.ASPxPivotGrid.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public class ExpressionDataBinding :
    ExpressionBindingBase

Remarks

You can assign an expression to a Pivot Grid field to calculate field values based on your formula or an aggregate function. These fields are called calculated fields.

Follow the steps below to create a calculated field in Optimized and Server modes:

  1. Create an ExpressionDataBinding instance and pass the expression in its constructor as a parameter.
  2. Assign the created object to the PivotGridFieldBase.DataBinding property.

Note

Use OLAPExpressionBinding in OLAP mode.

The following code snippet illustrates how to display the minimum sales in a product category.

View Example

  <dx:PivotGridField ID="fieldExpressions" Area="DataArea" AreaIndex="5"  Name="fieldExpressions" Caption="Expressions" >
    <DataBindingSerializable>
        <dx:ExpressionDataBinding Expression="Min([Extended Price])" />
    </DataBindingSerializable>
</dx:PivotGridField>

See the following topic for more information: Data Binding API.

Implements

DevExpress.XtraPivotGrid.IDesignerContextProvider
DevExpress.PivotGrid.DataBinding.IExpressionBinding

Inheritance

See Also