ExpressionDataBinding Class
Defines a calculation based on a string expression.
Namespace: DevExpress.Web.ASPxPivotGrid
Assembly: DevExpress.Web.ASPxPivotGrid.v24.2.dll
Declaration
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:
- Create an
ExpressionDataBinding
instance and pass the expression in its constructor as a parameter. - 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.
<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
Object
DataBindingBase
ExpressionBindingBase
ExpressionDataBinding
See Also