Adding a class to a row on DataTables initialization
Adding a class to a row on DataTables initialization
Loren Maxwell
Posts: 406Questions: 99Answers: 10
Is there a way to identify criteria to add a class to a <tr>
to highlight certain rows on initialization?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Here is an example from my own coding: Based on conditions I highlight certain rows (bold font) and make certain rows selectable. See rowCallback and the selector for the select extension in which I limit selectability to the rows with a certain class and exclude the first column.
and the CSS for "fontThick":
Thank you, but when I sort my table the "data" does not get sorted, thus resulting that my highlights is one of.
How is this fixable?
This question is answered in this thread:
https://datatables.net/forums/discussion/57940/sorting-breaks-rowrender#latest
Kevin