remove a class from a row?
remove a class from a row?
Sorry I don't have a simple test case, but I think this may be a simple question.
I see from https://datatables.net/manual/ajax#Optional-parameters how to add a class to a row using DT_RowClass.
Is there any way to remove the class I added later?
This question has an accepted answers - jump to answer
Answers
Yes, use
rows().nodes()
. See the example in the docs.Kevin
I could probably make that work. But I was wondering if there is anything the server can send to tell datatables to remove the class on a given row.
Ultimately what I'm trying to do is color a row based on some data within the row.
I was able to use DT_RowAttr to get what I am looking for:
on server
on client css
Another option is to use
createdRow
orrowCallback
, if the data can change, to apply styling to the row or cells in a row based on a condiftion. See this example.Kevin