update css AFTER edit
update css AFTER edit
hbanaharis
Posts: 32Questions: 14Answers: 3
Supposing we have css defined in columnDefs where we highlight a number based on a value, eg
columnDefs: [{
targets: '1',
createdCell: function(td, cellData, rowData, row, col) {
$(td).attr('title', cellData);
if ( cellData > 30 ) {
$(td).css('color', 'red');
}
How do we go about updating the css AFTER an edit to a cell?
Please provide an example
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The edited cell event can be accessed via
This enables the row which was edited to be accessed using jQuery via
Spot on! Currently DataTables itself doesn't have an event or callback for updated data, but Editor's events can be used for that.
Allan