Datagrid html

Is there any way to get a datagrid to process a field's value as HTML? I've tried putting a HTML template into the field in question without success (maybe a syntax issue at my end?). Ideally, I'd like the grid cell to display <font color = 'black'>Test</font><br /><font color = '#4caf50'>Test2</font> as it appears if you put it as the content in a Radzen HTML object.

Hi @markb,

Yes, it is possible:

Thanks for the reply. The HTML is actually in the value of one of the columns displayed on the grid. If I type in the HTML text as per your screenshots that works perfectly. If I try and set the template to, for example, ${data?.theHTMLField} all I get on the column is the text contained in the field rather than the processed HTML.

To display "RAW" html you need a different approach. Set the template to
<div [innerHTML]="data?.theHTMLField"></div>

1 Like

Works perfectly. Many thanks!