Simple. You never created columns named State and Code. A default data grid has 
no columns yet. In the properties dialog of the DataGrid object, popup the menu 
and select the 3rd option down, called columns. Add 2 columns, name the first 
one State, and the second one Code. 

Note, that if you left firstLineContainsColumnNames set to false, (the default 
behavior) then you could have named your columns anything you wanted, and 
excluded the column names from the first line of your data, it would have 
worked too. 

Bob

 
On Jul 10, 2010, at 8:31 AM, Roger Guay wrote:

> 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 
> theText
> end mouseUp

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

Reply via email to