Skip to main content

Data Binding API

  • 3 minutes to read

Overview

Pivot Grid uses the Binding API to bind Pivot Grid fields to data. Data binding sources can be columns in a data source, calculated expressions, or window calculations.

The following types of bindings are available:

Column Binding
Allows you to bind a Pivot Grid field to a data column in the data source. The Pivot Grid field obtains its values from a field in the data source.
Expression Binding
Allows you to bind a Pivot Grid field to an expression and display the calculated result. The expression can be a formula or an aggregate function.
Calculation Binding
Allows you to bind a Pivot Grid field to a window calculation and display aggregated values in the window.

Each specified binding object is a DataBindingBase descendant. This object is assigned to the Pivot Grid field’s DataBinding property.

The following table illustrates Pivot Grid data processing modes that support the Binding API:

Legacy and Legacy Optimized Optimized Server mode OLAP
Column Binding no yes yes yes
Expression Binding no yes yes yes
Calculation Binding no yes no no

Refer to the following article for more information about data processing modes: Pivot Grid Data Processing Modes.

Column Binding

The following table illustrates the Binding API that can be used in Optimized, Server, and OLAP modes:

Platform Class
WinForms DataSourceColumnBinding
WPF DataSourceColumnBinding
ASP.NET Web Forms DataSourceColumnBinding

Expression Binding

The tables below illustrate the Binding API that can be used in different Pivot Grid modes.

Optimized and Server modes:

Platform Class
WinForms ExpressionDataBinding
WPF ExpressionDataBinding
ASP.NET Web Forms ExpressionDataBinding

OLAP mode:

Platform Class
WinForms OLAPExpressionBinding
WPF OlapExpressionBinding
ASP.NET Web Forms OLAPExpressionBinding

Calculation Binding

The following table illustrates the Binding API that can be used in Optimized mode:

WinForms WPF ASP.NET
RankBinding RankBinding RankBinding
MovingCalculationBinding MovingCalculationBinding MovingCalculationBinding
DifferenceBinding DifferenceBinding DifferenceBinding
PercentOfTotalBinding PercentOfTotalBinding PercentOfTotalBinding
RunningTotalBinding RunningTotalBinding RunningTotalBinding
WindowExpressionBinding WindowExpressionBinding WindowExpressionBinding

More Documentation

Refer to the Platform-specific topics for more information on how to use the Data Binding API:

Pivot Grid for WinForms

Bind Pivot Grid Fields to Data Columns

Bind Pivot Grid Fields to Calculated Expressions

Bind Pivot Grid Fields to Window Calculations

Pivot Grid for WPF

Bind Pivot Grid Fields to Data Columns

Bind Pivot Grid Fields to Calculated Expressions

Bind Pivot Grid Fields to Window Calculations

ASP.NET Web Forms Pivot Grid

Bind Pivot Grid Fields to Data Columns

Bind Pivot Grid Fields to Calculated Expressions

Bind Pivot Grid Fields to Window Calculations

Demos

Examples

Pivot Grid for WinForms

How to Aggregate Data by the Field’s First Value

How to connect a Pivot Grid to an OLAP Data Source

LINQ to SQL - a Server Mode Example

Custom Group Intervals

How to Change SummaryDisplayType in the Context Menu

Pivot Grid for WPF

Field Calculation Data Binding

Bind a PivotGrid to an MS Access Database at Runtime

Bind a PivotGrid to an OLAP Cube

Custom Group Intervals

How to Change SummaryDisplayType in the Context Menu

ASP.NET Web Forms Pivot Grid

Field Calculation Data Binding

How to Aggregate Data by the Field’s First Value

How to Add Calculated Fields

How to Change the SummaryDisplayType

See Also