Display HTML in a data grid column

0
Is there any way to display HTML in a data grid column? I am able to put a RichText or CustomString widget into a list view but I have not been able to put widgets into columns in a data grid and if the contents of the column is edited using a RichText widget on the data view then the HTML value that is saved does not render as text you see the HTML tags. Alternatively is there an alternative data grid that does render HTML values?
asked
2 answers
0

Hi Sean,

One of my colleagues developed a widget to do this based of the cell styler widget.  The widget is on github but there is no documentation yet. I’ll do my best to explain how to set it up.

 

Place the widget under the datagrid. This is the widgets properties. You need to set the following:

  1. Grid Entity
  2. Grid Name
  3. One or more columns

 

 

The grid Entity is the same entity that is the data source of your datagrid. 

The grid Name can be found in the properties of the datagrid.

 

Optionally, you can use the parameter tab to use attribute values in the html that you want to inject into your datagrid.

 

Once you set that up, you can setup columns. You can add as many columns as you want, and each one will specify a column in the datagrid to inject the html. The only thing you need to configure here is the column name and define the html you want to inject. The position setting defines if you want the html to be placed before or after the data in your column. Replace will remove the existing value and put your html.

 

The column name can be found from the properties of the specific datagrid column that you are putting html into.

 

 

Here is the link to the widget. This is not published in the app store yet so use at your own risk.

https://github.com/swkruger/CellHtml

 

Hope this helps!

answered
0

Hi Sean,

Unfortunately, the data grid widget is quite limited in terms of its content. Alternatively, you can use Template Grid. You can fill the contents of each row as you like (including widgets). If you want to make the template grid to look as close as possible to a data grid, just use a table container for the contents.

answered