Hi,
I'm trying to display an icon in a grid based on the value of the 'IsProjectAdmin' property for the row data . I currently have this code:
$employeeList = new ej.grids.Grid({
allowSorting: true,
height: 300,
columns: [
{ field: 'ListName', headerText: 'Name' },
{
headerText: 'Is Admin',
textAlign:'center',
width: 300,
formatter: function (column, user) {
if (user.IsProjectAdmin) {
return "<i class='green check icon'></i>";
}
return "";
}
}
]
});
This works except for one thing: It displays the returned HTML from the formatter as text, rather than actually rendering it as HTML. This results in the following:
This is the intended result:
How could I get the formatter to actually render the result as HTML, or is there another way to do this?