Italic when data is null
Italic when data is null
karlie
Posts: 83Questions: 17Answers: 0
I would like to italicise the output when cell data is null and the value comes from a formula
if ( row['ten_margin'] &&row['each_cost_price'] !== null )
{return "£" + (row['each_cost_price'] * row['ten_margin']).toFixed(2);}
So the output from the above code I would like italicised.
Any pointers much appreciated.
This discussion has been closed.
Replies
Wrap it in
i
tags:return "<i>£....
Allan
Hi @karlie ,
This example here shows how to italise text - in this example, if the number in the fourth column is less that 30, it's italicised. You could do something like this.
Cheers,
Colin
What example is that Colin?
Sorry, it would help if I make the link - here it is: http://live.datatables.net/xireqobu/1/edit
Thanks Colin