The object is being passed to the first arraycollection through LCDS, and in the CFC I am creating a struct. I have no problem with the idea of converting it to another data type such as an XML string. The problem is I can't bind it to one ROW and column, I need to bind it to the second column of all rows - basically the first grid is the primary key in column one, and the property with all other columns and values in the object.
If I have a row selected in the second grid, or it's sorted or filtered in some way, and I do a removeall and then repopulate it...what will happen? I suppose I can store the sort, filter, and selectedIndex, and then reapply them after the refill - but I want to avoid any kind of "flicker" that the user would see. --- In flexcoders@yahoogroups.com, "Tracy Spratt" <tr...@...> wrote: > > 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. >