Adding Columns to a Datagrid via Script

André Bisseret andre.bisseret at wanadoo.fr
Fri Jan 21 13:57:55 EST 2011


Bonjour Ray,

One other solution :
--------
put the dgProp["columns"] of grp "datagrid" into tCols
put cr & "new column'name" after line 4 of tCols -- or else where, as you want
set the dgProp["columns"] of grp "datagrid" to tCols
-- and possibly for example :
set the dgColumnWidth["column'name"] of grp "datagrid" to n -- the width you like
---------------
HTH

Best regards from Grenoble

André


Le 21 janv. 2011 à 19:36, Ray Horsley a écrit :

> Really?  So there's no way other than this to add columns to a datagrid and,
> even more disappointing, there's no way at all to set column names from a
> script?
> 
> Ray Horsley
> LinkIt! Software
> 
> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com
> [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Peter Haworth
> Sent: Friday, January 21, 2011 12:29 PM
> To: How to use LiveCode
> Subject: Re: Adding Columns to a Datagrid via Script
> 
> I'm sure there will be more elegant solutions but if you add data to a
> datagrid that has more columns than defined, the extra column(s) are added
> to the right of each row.  No control over column names, etc though.
> 
> Pete Haworth
> 
> On Jan 21, 2011, at 8:38 AM, Ray Horsley wrote:
> 
>> Anybody know how to add columns to a datagrid via a script?
>> 
>> Thanks,
>> 
>> Ray Horsley
>> LinkIt! Software
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list