DG Table: Is it possible to edit the column template itself (not behavior) by script?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

DG Table: Is it possible to edit the column template itself (not behavior) by script?

Post by sritcp » Mon May 20, 2019 1:14 pm

The default column template in a Datagrid table is set up such that each cell contains an editable field ("field 1 of me").
I'd like a DG table where each cell has only a button.
I can use the IDE to edit the column template for each column, delete the field, and add a button.
My question is, is there a way to do this by script, in one go, by modifying some handler in the innards of Datagrid?

Thanks,
Sri

bogs
Posts: 3997
Joined: Sat Feb 25, 2017 10:45 pm

Re: DG Table: Is it possible to edit the column template itself (not behavior) by script?

Post by bogs » Mon May 20, 2019 1:35 pm

See if this lesson helps you at all Sri. Obviously you'll have to change some of the code, but it should get you close to an idea of what needs to be done.

There is also a lesson with the properties of a Dg.
Image

sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

Re: DG Table: Is it possible to edit the column template itself (not behavior) by script?

Post by sritcp » Mon May 20, 2019 2:01 pm

Thanks, bogs!
Looks like just the thing I need!

Regards,
Sri

bogs
Posts: 3997
Joined: Sat Feb 25, 2017 10:45 pm

Re: DG Table: Is it possible to edit the column template itself (not behavior) by script?

Post by bogs » Mon May 20, 2019 2:23 pm

Glad it helps you out Sri :D
Image

Klaus
Posts: 11317
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: DG Table: Is it possible to edit the column template itself (not behavior) by script?

Post by Klaus » Mon May 20, 2019 9:48 pm

Since LC is actually written in LC, we can script (almost*) everything!

*Not sure about the LCB stuff.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”