Make sure the first line of column headers are the *actual* names of the 
columns in the datagrid. Otherwise you will get nothing in the datagrid, 
because no columns matched what was in your headers. Note that initially some 
are confused, thinking the column LABEL is the column NAME. Not true. Verify 
the column headers are identical to the actual datagrid column names. 

Bob


On Dec 11, 2012, at 10:51 AM, Roger Eller wrote:

> Hi Pete,
> 
> Well this changes everything!  Literally!  So, if I wish to re-order the
> columns, this will fit the bill quite nicely.  Thank you for clarifying
> what this param actually does, Pete.
> 
> Back to what I was trying to do... If I need the first line of the imported
> text file to define the header names of each column, I will need to script
> that manually for each column, right?
> 
> I don't see any references to data grid properties like dgText in the LC
> dictionary.  There are a few lessons on the RunRev site, but I don't see an
> example of how to do this with a built-in function.  It's roll your own
> time, I guess.
> 
> ~Roger
> 
> 
> On Tue, Dec 11, 2012 at 1:09 PM, Peter Haworth <p...@lcsql.com> wrote:
> 
>> 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.el...@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 <kl...@major.on-rev.com
>>>> wrote:
>>> 
>>>> Hi Roger,
>>>> 
>>>> Am 11.12.2012 um 17:23 schrieb Roger Eller <
>> roger.e.el...@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
>>>> kl...@major.on-rev.com
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to