Page 1 of 1

HTML in DataGrids

Posted: Wed Mar 07, 2018 5:15 pm
by guylouis
Hi,

How do I put HTML text in a DataGrid?

In a field I can use set the HTMLText of field "X" to "blablaHTML"...

But how to do the same thing in a DataGrid?

Thanks

Re: HTML in DataGrids

Posted: Sat Mar 10, 2018 3:52 am
by guylouis
Because nobody answers to my post, I searched by myself... 😄

This is the simplest solution:

- Create a button "X" on the same card of the DataGrid "Y"

- Edit the script of this button:

on FillInData pData
set the htmltext of me to pData
end FillInData

- Obviously it's more beautiful to hide this button

- In the script of the card, put:

on opencard
set the dgProp["default column behavior"] of group "Y" to the long id of button "X" of this card
end opencard

You can also type this line in the Message Box

- Now, when you execute this line, the HTML text is written in the DataGrid

set the dgtext of group "Y" to "HTMLblabla"

That's all folks...

Re: HTML in DataGrids

Posted: Sat Mar 10, 2018 10:58 am
by Zryip TheSlug
guylouis wrote: ↑
Sat Mar 10, 2018 3:52 am
Because nobody answers to my post, I searched by myself...
Probably because you was not in the right place for posting your question. :)
This part of the forum is the place for questions about the "Data Grid Helper" Plugin, a commercial product for interfacing datagrids. Anyway, I just seen your question and I can confirm you have the right approach.

I will try to move your post in the right place, if I can figure out how to accomplish that.