setCellMeta is not working with afterChange event

Tags: #<Tag:0x00007f8b1d2b2230>

The use-case is very simple I am using afterChange event and doing some calculation.
Based on the calculation data I want to add some style/color to cell text or cell.
I try setCellMeta but it’s not working for me.
I use insert_row and setDataAtCell function.
Basic example which I try on JSFiddle

https://jsfiddle.net/5ehwvsry/

Thanks
Anil

Hi @anil

setCellMeta method does not trigger the cell renderer. If you would like to reflect all visual changes (like the background color) you also need to rerender the view. Here is an updated demo https://jsfiddle.net/gnLa56hd/

Thanks, @aleksandra_budnik,
It is working fine for me.
Can you please let me know if there is any way to get the HandsonTable container id or unique Id of the table?
I have multiple table instances on the same page and I want the unique ID of every generated table.

Thanks
Anil

Hi @anil

The table is not given any ID. But once you pass it to a variable you can use all the instance and plugin related methods like here https://jsfiddle.net/q039fn2L/
You can also pass a custom className to each of your instances and then just gather them via getSettings() method like in this example https://jsfiddle.net/o0jhepLb/

Does that answer your needs?

I’m closing this ticket as there are no further questions. However, @anil feel free to open a new ticket on the forum or send me support@handsontable.com an email