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
HTML in DataGrids
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: HTML in DataGrids
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...
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...
-
- VIP Livecode Opensource Backer
- Posts: 163
- Joined: Tue Jan 26, 2010 10:15 pm
- Contact:
Re: HTML in DataGrids
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.
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel