Is it possible.... (DataGrid Question)

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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
NigelS
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 83
Joined: Sat Oct 22, 2011 2:37 pm

Is it possible.... (DataGrid Question)

Post by NigelS » Mon Apr 15, 2013 12:28 pm

Greetings

Is it possible to use different templates in the DataGrid object so that some rows contain a tick box while others may have text in them. See Attachment.

if you look at the attached imagine,just as an example, the two text data entry properties (PLNID and Password) each would be a row and "Remember Me" is also a row but with different attributes. This would require two different Row Templates.

I've read through the LiveCode Data Grid pdf and not seen any mention of this other than creating a single template.

Nigel
Attachments
Example.png
Example.png (11.46 KiB) Viewed 2381 times

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Is it possible.... (DataGrid Question)

Post by sturgis » Mon Apr 15, 2013 1:08 pm

Put all your controls into a single template and hide/show the ones you need (in the fillindata & layout handlers) in the behavior script.

If you're using a table rather than a form it can be a bit more complicated because you have to create a custom template and script for each column that needs to be 'adjustable' but with a form you just create the single template and choose what to show in the behavior scripts.

NigelS
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 83
Joined: Sat Oct 22, 2011 2:37 pm

Re: Is it possible.... (DataGrid Question)

Post by NigelS » Mon Apr 15, 2013 2:22 pm

Excellent - let me try that. :)

Post Reply