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
close icon

exception occure at pivotcalculation

Hi,
I am using Pivot Grid Control .
I want to add calculations on quantity column  .
But it gives me exception .

my code is,

  pivotGridControl1.ItemSource = null;
          
            DataTable pivotgrid = new DataTable();
            int custID =Convert.ToInt32( cmbCustName.SelectedValue);
            pivotgrid = cbs.bindcustwisesaletrends(custID,dtpFromDate.Value,dtpToDate.Value);
           
            pivotGridControl1.ItemSource = pivotgrid;
            this.pivotGridControl1.TableControl.Refresh();

            this.pivotGridControl1.PivotRows.Add(new PivotItem { FieldHeader = "ItemName", FieldMappingName = "ItemName", TotalHeader = "Total" });
            this.pivotGridControl1.PivotRows.Add(new PivotItem { FieldHeader = "Month", FieldMappingName = "Month", TotalHeader = "Total" });


            this.pivotGridControl1.PivotColumns.Add(new PivotItem { FieldMappingName = "CustName", TotalHeader = "Total" });
            this.pivotGridControl1.PivotColumns.Add(new PivotItem { FieldMappingName = "SaleItemCode", TotalHeader = "Total" });

          
            PivotComputationInfo m_PivotComputationInfo = new PivotComputationInfo()
            {
                CalculationName = "SoldQty",
                FieldName = "SoldQty",
                Format = "C",
                SummaryType = SummaryType.Count
               
            };
          
          
           this.pivotGridControl1.PivotCalculations.Add(m_PivotComputationInfo);


   
Is any solution regarding this?

Thanks and regards,
Paurnima.





1 Reply

PM Piruthiviraj Malaimelraj Syncfusion Team June 23, 2016 10:57 AM UTC

Hi Paurnima, 
 
Thank you for using Syncfusion products. 
 
We have analyzed your reported scenario and created the simple sample based on your requirement but we could not able to reproduce the issue .We need some more details about your customization. Please provide us with the stack trace of the exception or modified the sample with issue reproducible. This would be very helpful for us to provide the exact solution at the earliest. 
 
Sample link: 
 
Regards, 
Piruthiviraj 


Loader.
Live Chat Icon For mobile
Up arrow icon