You can't use an Object as a dataProvider.  So you either need to loop using
for-each, or use a different data type for the second column.

 

An ArrayCollection might be best,  then you could bind the second DG:

dataProvider="{dg1.selectedItem.acCol2}"

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of postwick
Sent: Thursday, July 16, 2009 5:43 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] bind one arraycollection to another

 

  

I have an arraycollection that has two columns. the second column actually
stores an object that has properties on it. I want to put those values into
a second datagrid. Can I do this using binding? I was able to use a loop to
fill the second arraycollection, to which a datagrid is bound, by triggering
the loop function from the first arraycollection's collectionChange event.

However, I don't like this approach because it'll probably cause issues with
selectedItem on the datagrid (removeAll then repopulate would throw it off),
as well as a noticeable "flicker" when dealing with a large dataset.

If there's another format for the second column in the first arraycollection
that would work better than an object, I'm open to that too.



Reply via email to