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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Amount not shown in PivotGrid

Thread ID:





120634 Sep 29,2015 07:32 AM UTC Oct 26,2015 12:05 PM UTC WinForms 5
Tags: PivotGridControl
Asked On September 29, 2015 07:32 AM UTC

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.

Solai A L [Syncfusion]
Replied On September 30, 2015 12:41 PM UTC

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,

Replied On October 1, 2015 02:32 AM UTC

I attach image again.
Attachment: PivotGrid_cef1cf57.zip

Solai A L [Syncfusion]
Replied On October 6, 2015 11:36 AM UTC

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,

Replied On October 24, 2015 03:15 AM UTC

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

Solai A L [Syncfusion]
Replied On October 26, 2015 12:05 PM UTC

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,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon