Applying a change to all pages
Applying a change to all pages
trongart
Posts: 222Questions: 51Answers: 0
This test case has the button "Change Color" which changes the text color of column 0 to red. For some reason, this change only applies to the first page. When switching pages, the color is not changed.
How can I apply the color change for .data0 to all pages?
This question has an accepted answers - jump to answer
Answers
https://live.datatables.net/hebaxise/1/
Use the api and it works. Your way would only work for the rows currently visible.
and
Thank you very much! However, this does not work when using
"deferRender": true
as here: https://live.datatables.net/jeqifeso/1/editIs there a way to apply the change when
"deferRender": true
?That is true and is documented in the
deferRender
docs:In this case use
rowCallback
to apply or remove the color based on the clicked button. Use a global variable as a flag to track which button is clicked. For example:https://live.datatables.net/raxugoke/1/edit
Kevin