Need a special offer?Find out if your project fits.

Customizing showGrandTotals Option for Specific Columns

ELG PEDESTAIS asked on February 6, 2024

I'm writing to inquire whether it is possible to customize the "showGrandTotals". Specifically, we are interested in activating this option for only certain columns. We would like to define the columns to which this option will apply.
Below is an excerpt of the code for your reference:
"options": {

                "grid": {
                    "type": "flat",
                    "showTotals": "off",
                    "showGrandTotals": "on"
                "chart": {
                    "type": "line",
                    "showDataLabels": true,
                    "showFilter": true,
                    "showMeasures": false,

We would appreciate it if you could provide guidance on how we can achieve this customization or if this functionality is supported.
Thank you in advance for your attention to this matter.

2 answers

Nadia Khodakivska Nadia Khodakivska Flexmonster February 7, 2024


Thank you for reaching out to us.

We recommend using the customizeCell API call to hide the Grand Totals for specific columns. For example:

let hiddenGrandTotal = ["Quantity", "Discount"];

flexmonster.customizeCell((cell, data) => {
  if (data.isGrandTotal && data.hierarchy && hiddenGrandTotal.includes(data.hierarchy.caption)) {
    cell.text = "";

You can set additional conditions to hide the totals for the specific columns. Please check the following JSFiddle for reference: 

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,

Nadia Khodakivska Nadia Khodakivska Flexmonster February 14, 2024


Hope you are doing well.

We were wondering if you had a chance to check the suggested approach. Could you please confirm if it works for you?

Looking forward to hearing your feedback.

Kind regards,

Please login or Register to Submit Answer