How to change PivotComputationInfo Header
A property “UseDescriptionInCalculationHeader” which allows to display the name given in the “Description” property. The calculations header occurs in the column of the pivotgrid (as rounded with red pen in HeaderNameChanging fig) and it won’t change the name displayed in the Grouping Bar pivotcalculation button (as rounded with green pen in HeaderNameChanging fig attached with this) and the code snippet for this is given below:
C#
this.pivotGrid1.PivotEngine.UseDescriptionInCalculationHeader = true;
XAML
<syncfusion:PivotGridControl.PivotCalculations> <syncfusion:PivotComputationInfo CalculationName = "Total" Description = "Money" FieldName = "Amount" Format = "C" SummaryType="DoubleTotalSum"/> <syncfusion:PivotComputationInfo CalculationName = "Total" Description = "Units" FieldName = "Quantity" Format = "#,##0" SummaryType="IntTotalSum"/> </syncfusion:PivotGridControl.PivotCalculations
Figure: Pivot computation header changes only in columns
XAML
<syncfusion:PivotGridControl.PivotCalculations> <syncfusion:PivotComputationInfo CalculationName = "Total" Description = "Summation of values" FieldHeader="Sample1" FieldName = "Amount" Format = "C" SummaryType="DoubleTotalSum"/> <syncfusion:PivotComputationInfo CalculationName = "Total" Description = "Summation of values" FieldHeader="Sample2" FieldName = "Quantity" Format = "#,##0"/> </syncfusion:PivotGridControl.PivotCalculations> |
Figure: pivot computation header changes in both column and grouping bar