Reputation: 45
The requirements from the customer state that a record's Comment
and Description
fields must be displayed in the same cell but the text of the Comment
must be displayed in red while the Description
should be black. Using a mutator, I can combine the 2 fields and display them in one cell, but I haven't seen how to make one have red text and the other black text within that cell.
Is there a way?
Thanks,
Matt
Upvotes: 0
Views: 292
Reputation: 492
I wouldnt bother doing that, just use a Customer Formatter function
formatter:function(cell, formatterParams, onRendered){
return '<span style=color:red>' + cell.getRow().getData().Comment + '</span><P><span style=color:black>' + cell.getRow().getData().Description + '</span></p>';
}
Upvotes: 2