dataGrid - set the dgData[TRUE] to tText
Trevor DeVore
lists at mangomultimedia.com
Wed Jul 8 16:19:42 EDT 2009
On Jul 8, 2009, at 4:08 PM, Shao Sean wrote:
>> You should use the dgProps["columns"] property to do that.
>
> Not too certain about others, but why does the data grid not
> automatically do it?
The scenario that came to mind when I was deciding whether or not to
automatically create columns when passing in headers as the first key:
Application has a table and allows user to select a text file to
import. The text file has some additional columns besides those being
defined in the table. As a developer do you want those extra columns
to automatically be displayed in the table?
Maybe, maybe not. It is simple enough to create the columns yourself
if you do and this way there are no unintended consequences in your
shipping application.
It is true that setting the dgText without providing column headers
will create columns for you but really that was only done so that a
developer using a table for the first time could enter some data in
the property inspector and see it appear in the data grid.
Regards,
--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com - www.screensteps.com
More information about the use-livecode
mailing list