Hi,
I have questions on how the showGrandTotals option works. I have set its value to "on", but I'm seeing different behaviors on different grids.
Jsfiddles to demonstrate the issues:
In https://jsfiddle.net/7fxwhsj2/1/, the Grand Total row is showing up, but not in https://jsfiddle.net/yr8dugwt/.
Chen
Hello, Chen!
Thank you for reaching out to us.
Kindly note that the grand totals feature sums the values in cells for rows and columns accordingly.
In the second provided JSFiddle there are no fields in rows, so the shown values are already grand totals for each column. The grand total for the row can be found at the end of the horizontal scroll.
Hope it helps.
Feel free to contact us in case of any other questions.
Regards,
Solomiia
Hi Solomiia,
Thanks for the explanation. What is the difference, if any, between the "Grand Total" and "Totals" , other than they are for columns and rows respectively? How do we customize these labels?
Thanks.
Chen
Hello, Chen!
Thank you for getting back to us.
Kindly note that the Grand totals are the additional row and column, which calculates the overall sum of values for each column and(or) row. It can be hidden or shown for rows only, columns only, or both.
The totals(or subtotals) are the sums calculated for nested hierarchies and appear when there is more than one field in rows or columns.
The following JSFiddle illustrates the difference: https://jsfiddle.net/flexmonster/2p4htzov/.
Regarding your question about customizing the labels, could you please explain in more detail what labels you want to customize: the ones inside the Options pop-up or the ones visible on the grid?
Hope it helps.
Feel free to contact us if any other questions arise.
Regards,
Solomiia
Hi Solomiia,
Thanks for the JSFiddle explaining the totals. We like to customize the labels as shown in the grid. See attached screenshot.
Chen
Hello, Chen!
Thank you for your response.
Kindly note that it is possible to change the "Grand Totals" and "Totals" labels using the localization
approach:
global: {
localization: {
grid: {
grandTotal: "Customized row label",
totals: "Customized column label"
}
}
}
We have prepared a JSFiddle example for reference: https://jsfiddle.net/flexmonster/24xtrphv/.
You can find more details about localization in our docs: https://www.flexmonster.com/doc/localizing-component/.
Hope you will find our answer helpful.
Kind regards,
Solomiia
Thanks Solomiia. My issues are now resolved.
Hello, Chen!
Thank you for your feedback. It is always valuable for our team.
Please do not hesitate to contact us if any other questions arise.
Kind regards,
Solomiia