setting data grid columns by code

2011-11-10 Thread Andre Garzia
Hey Guys,

Anyone here knows if there is a way to set the column information of a data
grid table by code? I am saying that because I have a list of records and
depending on the type of record wanted, I will show different columns. I
checked the API but it appears that the only way there is by using dgText
with column names. Is there other way?

Cheers
andre

-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting data grid columns by code

2011-11-10 Thread Andrew Kluthe
columns
- Line delimited list of columns in your table.

put the dgProp[columns] of group Data Grid into sColumns

set the dgProp[columns] of group Data Grid to sColumns

It produces and accepts a line delimited list of columns. I have never done
this from script but I use it from message box all the time to copy columns
from one grid to another.

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/setting-data-grid-columns-by-code-tp4023932p4024020.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting data grid columns by code

2011-11-10 Thread Andre Garzia
On Thu, Nov 10, 2011 at 1:29 PM, Andrew Kluthe and...@rjdfarm.com wrote:

 columns
 - Line delimited list of columns in your table.

 put the dgProp[columns] of group Data Grid into sColumns

 set the dgProp[columns] of group Data Grid to sColumns

 It produces and accepts a line delimited list of columns. I have never done
 this from script but I use it from message box all the time to copy columns
 from one grid to another.


Thanks Andrew, this is very helpful! =)



  --
 View this message in context:
 http://runtime-revolution.278305.n4.nabble.com/setting-data-grid-columns-by-code-tp4023932p4024020.html
 Sent from the Revolution - User mailing list archive at Nabble.com.

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode




-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode