pFirstLineContainsHeaders is being ignored in DataGrid
Peter Haworth
pete at lcsql.com
Tue Dec 11 13:09:13 EST 2012
Hi Roger,
That parameter doesn't change the column names, it just defines the order
of the column data within each line of dgText. If it's false, then the
dgText is expected to contain the column data in the order the columns are
defined to the datagrid. When true, then the first line of dgText defines
the order of the column data by specifying the column names, for example
Col2,col1,Col3.
Pete
lcSQL Software <http://www.lcsql.com>
On Tue, Dec 11, 2012 at 9:50 AM, Roger Eller <roger.e.eller at sealedair.com>wrote:
> Hi Klaus,
>
> Thanks for the quick reply, but I still can not get it to work as you
> describe. I have tried in Revolution 4.0.0, LiveCode 5.5.1, and LiveCode
> 5.5.2. Without any parameter, the grid is populated without the headers
> changing. With the parameter [TRUE], the grid is not populated at all.
>
> ~Roger
>
>
>
> On Tue, Dec 11, 2012 at 11:27 AM, Klaus on-rev <klaus at major.on-rev.com
> >wrote:
>
> > Hi Roger,
> >
> > Am 11.12.2012 um 17:23 schrieb Roger Eller <roger.e.eller at sealedair.com
> >:
> >
> > > According to this datagrid lesson, this should work but it does not.
> > Could
> > > someone please confirm?
> > >
> > >
> >
> http://lessons.runrev.com/s/lessons/m/datagrid/l/7309-how-do-i-populate-a-data-grid-with-data
> > >
> > > on mouseUp
> > > answer file "Select a Tab Delimited text file:"
> > > set the pFirstLineContainsHeaders of grp "DataGrid" to true
> > > set the dgText [ pFirstLineContainsHeaders ] of grp "DataGrid" to URL
> > > ("file:" & it)
> > > end mouseUp
> > >
> > > The headers remain as "Col 1" "Col 2", etc.
> >
> > "pFirstLineContainsHeaders" is not a property of the datagrid, but a
> > parameter for dgtext!
> >
> > So this will work:
> > ...
> > set the dgText [TRUE] of grp "DataGrid" to URL ("file:" & it)
> > ...
> >
> > > ~Roger
> >
> > Best
> >
> > Klaus
> >
> > --
> > Klaus Major
> > http://www.major-k.de
> > klaus at major.on-rev.com
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list