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.