Le 13 déc. 09 à 22:10, James Hurley a écrit :

Bonjour,


Le 13 déc. 09 à 19:53, James Hurley a écrit :

> I am just getting into data grid fields and can't find first base.
>
> I can't find anything on data grids  in the Dictionary. Is this
> coming?

You could download the manual at :
http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7309-How-Do-I-Populate-a-Data-Grid-With-Data-
>
> Following the tutorial I tried the following:
>
> put field "data" into tData
> --This is a tab delimited text field with the first line being the
> column names
> put true into pFirstLineContainsHeaders

try set the pFirstLineContainsHeaders to true

> set the dgText [ pFirstLineContainsHeaders ] of group "DataGrid 2"
> to tData
>
> This does nothing.

In the chapter "How do I populate a data grid with Data ?
one found this :
"Note that if pFirstLineContainsHeaders is true then the columns must
already exist in your data grid
table in order to be displayed."
Does your columns already exist ?

Thanks Andre,

Yes the columns already exist.

If I set pFirstLineContainsHeaders to false, the field is populated with data but the columns are set to Col 1, Col 2 etc.

If I then set set pFirstLineContainsHeaders to true (with the columns already set to Col 1, Col 2, etc.) the columns remain unchanged but the body of the text is empty.

I did download the Manual. That is where I got this information from. Very perverse.


Jim Hurley

Bonjour Jim,

Your are right ; I just made a new stack with a data grid "dGrid" and a field "source"
created the columns manually in the inspector (col 1, col 2 etc)
In the field, the first tab delimited line includes the names for the columns.

Then

set the pFirstLineContainsHeaders of grp "dGrid" to true -- or, yes, put true into pFirstLineContainsHeaders as well
   put fld "source" into tData
set the dgText ["pFirstLineContainsHeaders"] of group "Dgrid" to tData

does not work as expected : the columns names keep being "Col 1, Col 2 etc"
and the first line of tData keeps being the first line of Dgrid :-((


Did not notice that before, as up to now, I did not use "pFirstLineContainsHeaders", I manually create the columns names and labels (an habit from the beginning of the dataGrid I guess!!)

Sorry, I don't know what we are missing! Sure Trevor will help soon ;-)))

Best regards from Grenoble
André














_______________________________________________
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