Bonjour,

Le 16 déc. 09 à 06:12, Trevor DeVore a écrit :

On Dec 16, 2009, at 12:04 AM, James Hurley wrote:
It's okay, the Data Grid likes to be beta up on once and a while :-)

As long as this is still in Beta, may I make a suggestion?

Sorry, that was supposed to be "beat" not "beta".

:-o))

(Does anyone ever let the possibility of the answer be "no" stop them?)
I had assumed when I saw the following code in the guide:

 put field "data" into tData
 put true into pFirstLineContainsHeaders
set the dgText [ pFirstLineContainsHeaders ] of group "DataGrid 2" to tData

I assumed that the data grid would function in much the same way that FileMaker does when importing an Excel file, i.e. it allows one to assign the items in the first line of the file to field names and the rest of the llines to populate these fields. That would be a reasonable behavior of "dgText[pFirstLineContainsHeaders]" il.e. when the parameter is true, the column headings are taken from the first line of the text field and the rest go into filling the columns.

I must confess that I interpreted this code in the same way
in particular, I think, because this phrase "If true then the data grid will extract the first line of pText …"


The first line is only used to tell the data grid which columns to map the rest of the data to. If you want to create columns then you will need to set the dgProp["columns"] property.
That's OK for me now, Trevor :-)
Might be nice to elaborate a bit in this lesson to prevent from this misinterpretation.

Best regards from Grenoble

André


You can't really use multiple parameters when using setProp (which is what dgText is). I'm kind of fudging things a bit by treating dgText as a custom property set and pFirstLineContainsHeaders as the custom property. The truth is we still don't have access to a very expressive syntax when creating custom controls (which the Data Grid is one).

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: 
http://revolution.bluemangolearning.com
_______________________________________________
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



_______________________________________________
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