Changing a Row font style and font color based on a Cell content?

Changing a Row font style and font color based on a Cell content?

dwitdwit Posts: 6Questions: 0Answers: 0
edited March 2013 in General
I was able to use the fnCreatedCell (per below) succesfully to change a cell style but I need to be able to change the entire row style based on a cell content. Can I do it using this code or does it require a different function?
Also would like to be able to change the image icon of a different cell in the row based on the cell content as above.

"aoColumnDefs": [
{ "aTargets": [10], "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
if (sData == '0') { $(nTd).css('color', 'grey').css('font-style', 'italic'); }
}
}
],

Replies

  • dwitdwit Posts: 6Questions: 0Answers: 0
    I resolved this! :)

    used..
    "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
    if (aData[10] == "0") {
    $(nRow).css('color', 'grey').css('font-style', 'italic');
    }
    },
This discussion has been closed.