I added some code to change the background color of certain rows using the fnRowCallBack function. That works fine. However, the row selection highlights no longer work for the rows that have the changed background color. Need some help getting that to work in conjunction with my background color code. Here is my code used to change the row color:
var table = $('#cancel').DataTable( {
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
if ( aData[1].startsWith("H")) {
if ( aData[1].endsWith("VS")) {
$(nRow).css('background-color', 'orange');
}
else if ( aData[1].endsWith("O")) {
$(nRow).css('background-color', 'yellow');
}
else {
$(nRow).css('background-color', 'pink');
}
}
if ( aData[8].length > 0 ) {
$(nRow).css('background-color', 'pink');
}
},
.......
});