Send optional custom parameter to customizeCell function

I’ve got the specific cells format in json object and I would like to apply it in customizeCell function.
Is it possible to send optional parameter to this function ?
Julien Puleo

3 answers

Dmytro Zvazhii Flexmonster March 20, 2018

Hello Julien,
Thank you for your question. The customizeCell function does not allow sending additional custom parameters. Still, could you please give us some more information about your use case? It will be much easier for our dev team to find an appropriate solution.
Waiting for the update from you.

Julien PULEO April 11, 2018

Hello Dmytro,
My case is easy, I’ve got in object all information about, background color, color, font, etc… for total and subtotal, and I would like to access of my object in customizeCell to use and apply it.
Waiting for the update from you.

Tanya Gryshko Flexmonster April 11, 2018

Hello, Julien,
Thanks for specifying the details of your case.
We can suggest you the following approach:
1. Add certain CSS classes to subtotal and total cells in customizeCellFunction.
2. Define these CSS classes elsewhere in your code using the information from JSON object with the specific cells format.
Please check this sample:
Here customizeCellFunction adds three CSS classes:

function customizeCellFunction(cell, data) {
if (data.isClassicTotalRow) cell.addClass("fm-total-classic-r");
if (data.isGrandTotalRow) cell.addClass("fm-grand-total-r");
if (data.isGrandTotalColumn) cell.addClass("fm-grand-total-c");

These CSS classes are defined directly in CSS box and you can add them dynamically.
Please let me know if you have further questions.

Please login or Register to Submit Answer