wpf-devexpress-dot-xpf-dot-pivotgrid-dot-calculationbinding-75d34364.md
Gets or sets a data binding object that provides the data to calculate.
Namespace : DevExpress.Xpf.PivotGrid
Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll
NuGet Package : DevExpress.Wpf.PivotGrid
public DataBinding Source { get; set; }
Public Property Source As DataBinding
| Type | Description |
|---|---|
| DataBinding |
A DataBinding descendant that provides the source data.
|
A Source can be a DataSourceColumnBinding object that retrieves data from a data source or any other DataBinding descendant that provides calculated data.
The example below shows how to use RunningTotalBinding to display a cumulative total of the Extended Price field values.
View Example: Pivot Grid Optimized Mode - Field Calculation Data Binding
RunningTotalBinding class with the Source property set to a DataBinding descendant instance.RunningTotalBinding instance to the PivotGridField.DataBinding property.<dxpg:PivotGridControl
<!-- ... -->
DataProcessingEngine="Optimized"
<!-- ... -->
<dxpg:PivotGridControl.Fields>
<!-- ... -->
<dxpg:PivotGridField
Area="DataArea"
AreaIndex="4"
Caption="Running Total"
CellFormat="C"
Name="fieldRunningTotal">
<dxpg:PivotGridField.DataBinding>
<dxpg:RunningTotalBinding PartitioningCriteria="ColumnValue" SummaryType="Sum">
<dxpg:RunningTotalBinding.Source>
<dxpg:DataSourceColumnBinding ColumnName="Extended Price" />
</dxpg:RunningTotalBinding.Source>
</dxpg:RunningTotalBinding>
</dxpg:PivotGridField.DataBinding>
</dxpg:PivotGridField>
<!-- ... -->
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Source 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.
<dxpg:PercentOfTotalBinding PartitioningCriteria="ColumnValue">
<dxpg:PercentOfTotalBinding.Source>
<dxpg:DataSourceColumnBinding ColumnName="ExtendedPrice"/>
See Also