colorcoded rows according same values in column
colorcoded rows according same values in column
Hello,
I am looking for a way to highlight rows with the same value in a specific column. The color should change with the value. During my search I found:
createdRow: function( row, data, dataIndex){
$(row).addClass(data.color);
}
But I also found this page:
https://legacy.datatables.net/release-datatables/examples/basic_init/table_sorting.html
Is this feature allready integrated? Because this is, what I am looking for.
Happy for some answer. Thanks!
Regards
Harald
Answers
No. Looking at the source code each row has a class assigned, for example
<tr class="gradeC">
. This class is coloring the rows, its not dynamic or generated by Datatatbles.Using
createdRow
is the way to go. Here is a live example.Kevin