HTML in DataGrids

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
guylouis
Posts: 26
Joined: Mon Feb 01, 2016 11:45 pm

HTML in DataGrids

Post by guylouis » Wed Mar 07, 2018 5:15 pm

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

guylouis
Posts: 26
Joined: Mon Feb 01, 2016 11:45 pm

Re: HTML in DataGrids

Post by guylouis » Sat Mar 10, 2018 3:52 am

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...

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

Re: HTML in DataGrids

Post by Zryip TheSlug » Sat Mar 10, 2018 10:58 am

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.
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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”