How to use template to prepend icon and change color of datatable cell

Hi,

I have a datatable that’s being populated. One of the columns is a status column. I’d like to use a template to prepend a font-awesome icon (or perhaps even a custom .ico file) in certain cases and change the color of both the text and the icon. So if the text i get is “good” i’d like to prepend a thumbs-up icon and make both the icon and the text green. If the text is “bad” i’d like to prepend a thumbs-down icon and make both the icon and text red. Does any one have any suggestions?

Hi,

As template can be a function, you can return any html-formatting for any cell depending on the required conditions. Check the snippet:

http://webix.com/snippet/a21127f4

Thank you!