aaData + CSS
aaData + CSS
Hi, after searching the documentatio I can´t find what I need. Does someone know if i can use aaData and apply to a specific td a css class?
I what to add some color rules to my data.
For example, if the value is unden 50 then background is red and text white.
Has some done this?
I what to add some color rules to my data.
For example, if the value is unden 50 then background is red and text white.
Has some done this?
This discussion has been closed.
Replies
[code]
"aoColumnDefs": [
{
"aTargets":[1],
"fnCreatedCell": function(nTd, sData, oData, iRow, iCol)
{
if(sData < 50)
{
$(nTd).css('background-color', 'red');
$(nTd).css('color', '#fff');
}
}
}
]
[/code]