zryip.theslug at gmail.com
Sat Jul 10 13:08:23 EDT 2010
In fact you have to create the columns first as it was discussed in this
you have to create a column "State" and a column "Code" in your grid and
then you could populate it with the code you pick in the doc.
Use the dgText[true] when you import data from a text file for example and
if you would like to avoid to import the first line of the text if it
represents the column headers.
If you use set the dgText [ firstLineContainsColumnNames ] of group
"DataGrid 1" to theText, you will obtain in the Grid:
If you use set the dgText of group "DataGrid 1" to theText, the Grid will
2010/7/10 Roger Guay <irog at mac.com>
> Many thanks to all who responded to my previous post. Can anyone tell me
> why this script doesn't work?
> on mouseUp
> ## Create tab delimited data.
> ## Note that first line has name of columns.
> ## Providing names tells Data Grid how to map
> ## data to appropriate columns.
> put "state" & tab & "code" & cr & \
> "ALABAMA" & tab & "AL" & cr & \
> "ALASKA" & tab & "AK" into theText
> ## Let Data Grid know that first line has column names
> put true into firstLineContainsColumnNames
> set the dgText [ firstLineContainsColumnNames ] of group "DataGrid 1" to
> end mouseUp
> This is in the "How Do I Create My First Data Grid Table" lesson of
> Thanks and cheers,
> Roger Guay
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
-Zryip TheSlug- wish you the best! 8)
More information about the Use-livecode