DataTable Runtime values update without destroy Table and change row Bg color
DataTable Runtime values update without destroy Table and change row Bg color
Uzairkhan92
Posts: 36Questions: 10Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I'm using Datatables, and I'd like to alter the background color of the updated grid to either green or red without erasing the table. My table values change after 1 second so I don't want to destroy my entire table just want to update the cell with the pulse effect.
I attach the Images of my requirement.
I would appreciate I if you share any sample code.
Replies
I'm guessing you are using
createdRow
to change the background color. This runs only once. UserowCallback
instead which runs each time that table is drawn.Kevin
Use rowCallback and take a look at the examples
https://datatables.net/reference/option/rowCallback
it would be great if share any JSfiddle live example.
Here is an example using
createdRow
. Instead userowCallback
, the rest of the code will be the same.If you still need help then please provide a link to your page or a test case example showing what you have and what you want to do.
Kevin