Articles in this section
Category / Section

How to change PivotComputationInfo Header

1 min read

 

 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
 

 

D:\documentation\FieldHeaderName\HeaderNameChanging.PNG

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>

 

 

D:\documentation\FieldHeaderName\HeaderNameChanged in both.PNG

Figure: pivot computation header changes in both column and grouping bar

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied