aspnet-devexpress-dot-web-dot-aspxpivotgrid-9f18684d.md
Allows you to calculate the input of all values in the window as a percentage of the total.
Namespace : DevExpress.Web.ASPxPivotGrid
Assembly : DevExpress.Web.ASPxPivotGrid.v25.2.dll
NuGet Package : DevExpress.Web
public class PercentOfTotalBinding :
PercentOfTotalBindingBase
Public Class PercentOfTotalBinding
Inherits PercentOfTotalBindingBase
Do the following to bind a Pivot Grid field to the result of the Percent of Total window calculation in Optimized mode:
PercentOfTotalBinding class with the Source property set to the DataBindingBase descendant instance.PercentOfTotalBinding instance to the PivotGridFieldBase.DataBinding property.The example below shows how to use PercentOfTotalBinding to display the percentage of total sales in the Pivot Grid.
<dx:PivotGridField ID="fieldPercentOfTotal" Area="DataArea" AreaIndex="2" Name="fieldPercentOfTotal" Caption="PercentOfTotal">
<DataBindingSerializable>
<dx:PercentOfTotalBinding PartitioningCriteria="ColumnValueAndRowParentValue">
<SourceSerializable>
<dx:DataSourceColumnBinding ColumnName="Extended Price" />
</SourceSerializable>
</dx:PercentOfTotalBinding>
</DataBindingSerializable>
<CellFormat FormatString= "p" FormatType= "Numeric" ></CellFormat>
</dx:PivotGridField>
See the following topic for more information: Data Binding API.
DevExpress.XtraPivotGrid.IDesignerContextProvider
Object DataBindingBase CalculationBindingBase PercentOfTotalBindingBase PercentOfTotalBinding
See Also