Hi,
I am using version 15.4.0.20 of the Syncfusion PivotGrid component. I am attempting to make an Editor for a particular data that fits the PivotGrid perfectly.
I am getting close to completing this but noticed a behavior I would like to disable, if possible.
When I show the grid, it allows you to condense rows of data. When they are condensed it shows the "sum" of the values in the column. I would like to instead to show nothing, since these are factors, and really shouldn't be added, averaged, or even counted.
I attached an image showing the open row, and then the condensed row.
Basically, I call out to a service. It returns a json object with all the rows that I need, and the items that should be the rows and the columns. I then load the "pdata" with the result set, and push the rows and columns in, set some grid features off, set the dataSource and bam..the PivotGrid shows.
Code sample:
var pdata = {
data: datareq.PcRates, cube: "",
rows: [],
columns: [],
values: [{ fieldName: "Data2", fieldCaption: "Factor" }],
filters: []
};
for (index = 0; index < datareq.ScreenColumns.length; ++index) {
pdata.columns.push({ fieldName: datareq.ScreenColumns[index], fieldCaption: datareq.ScreenColumns[index], showSubTotal: false });
};
for (index = 0; index < datareq.ScreenRows.length; ++index) {
pdata.rows.push({ fieldName: datareq.ScreenRows[index], fieldCaption: datareq.ScreenRows[index], showSubTotal: false });
};
$('#PivotGrid1').data('ejPivotGrid').model.enableGrandTotal = false;
$('#PivotGrid1').data('ejPivotGrid').model.enableCellEditing = true;
$('#PivotGrid1').data('ejPivotGrid').model.enableGrandTotal = false;
$('#PivotGrid1').ejPivotGrid({ dataSource: pdata });
This is working fine, except when I condense the row, it shows the "sum" of the contents of the Value elements.
I attempted to use the "summaryType: ej.PivotAnalysis.SummaryType.Count" in the values portion of pdata, but that only caused the grid to display a "1" (one) in every field.
I am looking for help on this. I think I exhausted all resources online, or maybe I am using the wrong search keywords.
Please help me either:
1) disable the 'rollup' feature.
2) show nothing in the summary field if the section is rolled up.
The attached file contain only an image of the PivotGrid open, and then with a row condensed.
Attachment:
PivotGrid_Open_Closed_f4b2786.zip