Hmm, can you tell me what functionality you are going for?

 

I mean, since you are building the itme objects, you will know the
structure.  You could add a property that describes the structure, say
in a delimited list:

contactId,String;contactName,String;Field_n1,Boolean;Field_n2,Boolean;..
.

 

You could store it on the first record only.

 

Or you could do a for in loop over the item object properties, and
examine them.

 

Tracy

 

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of michrx7
Sent: Monday, November 27, 2006 4:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Someone please help me build this array
collection...

 

Yes, you understood me perfectly. Thank you * one million.

Hopefully final question for awhile (yea, who am I kidding)...

Is it possible to later check the see which columns in the 
arraycollection have boolean values? And if so, would you supply 
some sample code?

-Mike

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <[EMAIL PROTECTED]> 
wrote:
>
> If I am understanding correctly (untested)
> 
> 
> 
> var oItem:Object;
> 
> for ( var i:int=0;i< theColleagues.length;i++) {
> 
> oItem = new Object();
> 
> oItem.contactId = theColleagues[i].contacID;
> 
> oItem. contactName = theColleagues[i].contactName;
> 
> for ( var j:int=0;j< theItems.length;j++) {
> 
> oItem[theItems[j]] = false;
> 
> }
> 
> myArrayCollection.addItem(oItem)
> 
> }
> 
> 
> 
> I'm not sure what you mena by "be the same length as the columns
> contactID"
> 
> 
> 
> Tracy
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>

[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of michrx7
> Sent: Monday, November 27, 2006 9:28 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Someone please help me build this array
> collection...
> 
> 
> 
> I need to build an array collection with a dynamic # of columns so 
> that I can use it as a dataProvider in a datagrid.
> 
> I am trying to combine the following:
> 
> 1) Columns 1 & 2 need to be a copy of an arraycollection 
> called "theColleagues" with two columns that are returned by a 
> remoteoject call to a CFC.
> a) contactID - a list of ID#s
> b) contactName - a list of Names
> 
> 2) I have an array with the names of items available on the form 
> let's say it is called "theItems". I need columns 3 - n to use the 
> header name found for each column in "theItems", but I need the 
> values in the column all set to boolean false and to be the same 
> length as the columns contactID and contactName found in step 2.
> 
> If I am able to do this I will be able to finish my project and 
get 
> back in the good graces of everyone involved.
> 
> Thanks,
> -Mike
>

 

Reply via email to