Hi,
i have a grid with customer info.
Each customer has one or more drawings assigned. Every Drawing has a Status (Color).
I get all drawings assigned to the customer. Now i want to show a div tag colored with the Status-Color.
In QueryCellInfo i can write div tag to column cell but it shows me div as text and not div as div tag like in html.
I tried disableHtmlEncoding:false but it works only for Grid Headers.
queryCellInfo: function (args) {
if (args.column.field === "drawingStatus") {
var customer = args.data;
var colors = customer.drawingState;
var divsToAppend = "";
for (let i = 0; i < colors.length; i++) {
var color = colors[i];
divsToAppend += '<div title = "' + color.name + '"style="margin-left:5px;display:inline;float:left;width:20px;height:20px;background-color:' + color.color + ';"></div> ';
}
$(args.cell).text(divsToAppend);
}
return;
},
You can see attached image.
Any idea?
Thank you
Attachment:
image_35d6d9e1.zip