Posted 5 March 2020, 6:08 pm EST - Updated 3 October 2022, 5:06 pm EST
Hide the column in pivotGrid
Posted by: sravya_tamma on 5 March 2020, 6:08 pm EST
-
-
Posted 6 March 2020, 2:08 am EST
Hi Sravya,
You can set the showColumnTotals value to wijmo.olap.ShowTotals.None. This will hide all the column totals. Similarly, you can hide the row totals also by using the showRowTotals property of PivotEngine.
https://www.grapecity.com/wijmo/api/classes/wijmo_olap.pivotengine.html#showcolumntotals
Regards,
Ashwin -
Posted 6 March 2020, 2:40 pm EST
Thanks Ashwin. It worked!
Another question: If I decide to keep the “Amount” column and when the I filter out some values (Eg: Say remove Kelly) then I see the amount is changing with respect to the filter.
I would like to have the Amount column remain static. How can I achieve this ?
Thanks,
Sravya. -
Posted 9 March 2020, 2:06 am EST
Hi Sravya,
The behavior you observed is by design. As the filter is applied on any field, the aggregate data is calculated accordingly and display in PivotGrid.However, to retain the Amount Column value as it is, you may hide the specific column by getting its index. Please refer to the following code snippet for reference:
var pivotGrid = wijmo.Control.getControl(selector); pivotGrid.columns[2].visible=false;
Hope it helps!
Regards,
Manish Gupta