Page 1 of 1

Is it possible.... (DataGrid Question)

Posted: Mon Apr 15, 2013 12:28 pm
by NigelS
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

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

Posted: Mon Apr 15, 2013 1:08 pm
by sturgis
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.

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

Posted: Mon Apr 15, 2013 2:22 pm
by NigelS
Excellent - let me try that. :)