Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81728

Setting background on row.data change

$
0
0

I need to set the background of the cell depending by the value of the associated data.
in my tbale I've set the 'createdCell' event:

            {
                "targets": 5,
                "createdCell": function (td, cellData, rowData, row, col) {
                    if (tipoRecord === 'Ricevuti' && rowData.Gestore !== '') {
                        $(td).css('background-color', rowData.GestoreColor);
                    }
                }
            }

When I update the value of the cell with row.data(newdata), other values of the row are changed correctly, but the 'createdCell' event is not called, so the Background doesn't change.
How can I set the background on data update?


Viewing all articles
Browse latest Browse all 81728

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>