How to set background-color of the DataTable row including first column

How to set background-color of the DataTable row including first column

ganeshdksganeshdks Posts: 2Questions: 2Answers: 0
edited November 2014 in Free community support

How to set background-color of the DataTable row including first column of which the 3rd column contains a text.
I used Jquery :-
$(document).ready(function () {
$('tr:has(td:contains("Total"))').css("background-color", "Red"); // works for the complete row excluding first column
$("tr td:contains('Total')").each(function () {
$("tr td:contains('Total')").attr("style", "background-color:Red"); // doesn't work at all
});
});

But I could not get it working. Please help.

This discussion has been closed.