Hello,
I have an issue with exporting data after cells have been customized.
There are buttons added into cell using "customizeCell" method and via "cell.text" property. Something like this:
customizeCell = (cell, data) => {
if (cellDataHasOneWord()) {
cell.text += '<button onclick="displayDialog(\'' + data.rows[0].caption + '\')">Display Dialog</button>'
}
}
But after that using export functionality leads to redundant text in this cell, for example "Name1 Display Data" instead of "Name1".
Is there any way to remove this unnecessary text from the exported file?
Hello, Serhii,
Thank you for your question.
To remove the customization from the cells in the exported file, we suggest invoking customizeCell
with the null
parameter on exportstart event and with the customizeCellFunction
parameter on exportcomplete. Please kindly note that this approach works for every export format except an image.
We have prepared an example for illustration: https://jsfiddle.net/flexmonster/me08kdwa/.
Please let us know if it works for you and if any other questions arise.
Best regards,
Milena
Hi, Serhii,
We were wondering if our response helped you with your question.
Could you please let us know if the suggested approach works for you?
Looking forward to your response.
Kind regards,
Milena
Hi Milena,
Your answer helped, solved my issue.
Thanks a lot!