DataGrid Stuff
Bob Sneidar
bobs at twft.com
Mon Jul 12 20:34:25 EDT 2010
I see. When you say "The data grid will show this" I thought you meant that "the data grid would SHOW this" but you meant "the data grid will be in this state" and showed what the header of the data grid would be. My bad.
Bob
On Jul 12, 2010, at 12:52 PM, zryip theSlug wrote:
> 2010/7/12 Bob Sneidar <bobs at twft.com>:
>> Not strictly true. His script worked fine if I named the columns "State" and "Code" respectively.
>
> Or maybe not strictly true because I inverted the two sample preview
> of what you will obtain in each case.
> I pointed out here the two results obtain if you use or not the
> firstLineContainsColumnNames parameter. And definitively not pointed
> out that the script doesn't work.
>
> So to correct things we have to read:
>
> If firstLineContainsColumnNames is false, the grid will show this:
>
> State Code ---> Header of the Datagrid
> state code ---> First line of data
> ALABAMA AL ---> Second line of data
> ALASKA AK ---> Last line of data
>
>
> If firstLineContainsColumnNames is true, the Grid will contain:
>
> State Code ---> Header of the Datagrid
> ALABAMA AL ---> First line of data
> ALASKA AK ---> Last line of data
>
>
> Finally, the better way is to create the two columns by code during
> the importation of the data:
>
> if (firstLineContainsColumnNames) then
> if (the dgProp["columns"] of group "DataGrid 1" is empty) then
> put first line of theText into tHeaderLine
> replace tab with return in tHeaderLine
> set the dgProp["columns"] of group "DataGrid 1" to tHeaderLine
> end if
> end if
>
> set the dgText[firstLineContainsColumnNames] of group "MyDataGrid" to theText
>
>
> Thanks Bob. I hope that you will found this answer strictly better
> than the previous ;)
>
>
>
> --
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list