We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Amount not shown in PivotGrid

Hello, I try to use PivotGridControl and bind ItemSource with DataTable. All fields can display except "Amount".
My DataTable result looks like this:

Sect Year Month Quarter Amount
SA-MSD2014 11 Q1 21375
SA-MSD 2015 2 Q2 1668675
SA-MSD 2015 3 Q2 673000
SA-MSD2015 4 Q3 0
SA-MSD2015 5 Q3 16400000
SA-MSD 2015 6 Q3 37000
SA-MSD 2015 8 Q4 2390000
SA-MSD 2015 9 Q4 187362.5

And Code to initialize grid control looks like this:
public void InitializeGridControl()
this.pgcResult.ItemSource = dt;
this.pgcResult.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
//this.MetroColor = System.Drawing.Color.Transparent;
// Adding Pivot Rows to Grid
this.pgcResult.PivotRows.Add(new PivotItem { FieldMappingName = "Sect", TotalHeader = "Total" });
this.pgcResult.PivotRows.Add(new PivotItem { FieldMappingName = "Year", TotalHeader = "Total" });
//Adding Pivot Columns to Grid
this.pgcResult.PivotColumns.Add(new PivotItem { FieldMappingName = "Quarter", TotalHeader = "Total" });
this.pgcResult.PivotColumns.Add(new PivotItem { FieldMappingName = "Month", TotalHeader = "Total" });
//Adding PivotCalculations to Grid
this.pgcResult.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Amount", Format = "#,##0", SummaryType = SummaryType.DoubleTotalSum });

And this is result:
Please give any suggestion to resolve a problem. Thanks.

5 Replies

SA Solai A L Syncfusion Team September 30, 2015 07:41 AM

Hi Chairat,

Thank you for using Syncfusion Products. 

We had analyzed your query and the image provided is not visible. So, please share the image via attachment, zipped/Rar format. We have prepared a similar sample using the data table. Please refer to the sample and update whether it is the same problem.


Thanks & Regards,

CY CHAIRAT YANWITTAYAKOOL September 30, 2015 09:32 PM

I attach image again.
Attachment: PivotGrid_cef1cf57.zip

SA Solai A L Syncfusion Team October 6, 2015 06:36 AM

Hi Chairat,

The Pivot Calculations column will be visible based on the property ShowCalculationsAsColumns and it is set to true by default. If the Calculation column is not visible, the data isn’t related properly. Refer to the following sample and image. If such correlation is not correct, then the column would  be missing. So, please change the data accordingly.

Sample location :
C:\Users\<user>\AppData\Local\Syncfusion\EssentialStudio\<version>\Windows\PivotGrid.Windows\Samples\Appearance\Pivot Grid Demo\CS

Thanks & Regards,


Hi AL.Solai.,

  Thanks for your reply. Problem has been solve. But I found another problem about loading data again.
When I click button to call InitializeGridControl() at first time, Pivot works fine. But when call it again, It throw exception like this at line:

this.pgcResult.PivotCalculations.Add(new PivotComputationInfo { FieldName = "Amount", Format = "#,###.#0", SummaryType = SummaryType.DoubleTotalSum });

Exception 1

Exception 2

I try to use this code to clear all data before call function but it still same error. 


Do you have any suggestion?

Attachment: Exception_7e10ed22.zip

SA Solai A L Syncfusion Team October 26, 2015 07:05 AM

Hi Chairat,

Thank you for your update.

We created an incident for this query in our DT support for better communication. So, please login our DT support.
Link :

Thanks & Regards,

Live Chat Icon For mobile
Up arrow icon