Changing row color and comparing two columns with datatables
Changing row color and comparing two columns with datatables
1) I want to change the row color depending on a column value. Ex if(column[a]=="xx") row color=red else row color=green; I don't know how to do this and
2)I want to implement something like Ex if(column[a]=="xx") hide column[b] else show column[b];
Please someone help me out,
2)I want to implement something like Ex if(column[a]=="xx") hide column[b] else show column[b];
Please someone help me out,
This discussion has been closed.
Replies
[code]"fnCreatedRow": function( nRow, aData, iDataIndex ) {
if ( aData[4] == "something" ) {
$(nRow).addClass('green-row');
}
}[/code]