Unable to manipulate cell – customizeCell
I’m trying to use the event customizeCell to change the format of my cell. In the trial version I was able to manipulate the way I wanted just fine, but now I’m using the developer license and the event do not have the same behavior as before.
The event receives two parameters, data and cell, with the cell parameters I could simply do “cell.text = personalizedFormat(data.value)”, but now is no longer as object (the “console.log(cell)” shows only the content of the cell as a string). I tried to use the method “getCell(data.rowIndex, data.columnIndex)” but it didn’t work. I also read the thread “http://www.flexmonster.com/question/how-to-change-the-background-color-of-cell-dynamically-using-customizecell/” and even replicate the example in there but no success.
The exact version that was provided to us was “Version 2.324 (build 11/09/2017 09:16:03) – Edition: CSV/JSON/SQL Unlimited – Developer’s version“.
Thank you for providing us with such a detailed description.
Our documentation describes
customizeCell for version 2.4. Please consider migration to this version. You can find the migration guide by the following link: http://www.flexmonster.com/doc/migration-guide-from-2-3-to-2-4/.
In version 2.3, which you are currently using, the first parameter of
customizeCell function was not the cell object but a string containing HTML. You can find the working sample with version 2.3 here: http://jsfiddle.net/flexmonster/q1gtwj48/5/.
Please let me know if your issue was resolved.
Thanks for the help! I was able to change manipulate the cells using your example now!
I tried to update the version to 2.4 (actually I just put back the trial version and continue using my new developer key) but occur an error when trying to change the aggregation by using the “Field” window (only on Firefox though). I will continue using the 2.3 version until this bug be fixed.
It is great to hear that you have solved the issue with customizeCell. Could you please give us some more information about the issue with changing aggregation in Fields? It would very helpful if you send us the steps for reproducing the issue. Also could you please tell us if the issue is reproducible on our website demo – http://www.flexmonster.com/demos/pivot-table-js/ ?
Waiting for the update from you.
In the demo the Error does not occur, only in my localhost environment. The error also does not occur when the aggregation is defined on init (just when is changed after being loaded).
I’m using Firefox 55.0.3 (32-bit) (I tried in 64 bit version too). The Flexmonster PivotTable version is “Version 2.403 (build 11/09/2017 09:44:07) – Edition: CSV/JSON/SQL Unlimited – Pivot Table & Charts Component – Developer’s version“. I tried load the default language and the “Portuguese” translation JSON.
The error message in the console is “ReferenceError: event is not defined[Learn More] flexmonster.js:9:1”.
The steps to reproduce the error is just load some data, open the “Fields” window and, on values area, try to change the aggregation for some field.
I hope my answer be help you find the solution.
Thank you for specifying all the details.
We were able to reproduce the issue on our side. It will be fixed within minor release 2.405, ETA Oct 9.
Please let me know if you have further questions.
We will wait the new release then.
We have no more questions for now.
Thank you very much.