views:

1330

answers:

1

I'm trying to loop through a row of an arraycollection using nested repeater;

<mx:Repeater id="rp1" dataProvider="{arrayCollection}">
    <mx:Repeater id="rp2" dataProvider="{rp1.currentItem}">
        <mx:Button height="49" width="50" label="{rp2.currentItem.name}" /> 
    </mx:Repeater>
</mx:Repeater> 

What im trying to do is make the repeater loop through all the attributes in the currentRow, eg. name,age, address etc. At the moment all i do is call rp2.currentItem.name which explicitly calls out the name of the attribute and then the value is returned.

Is it possible instead of explicity naming the attribute to just loop through them all and dispplay button for each using the nested repeater?thanks

A: 

Do you want a single Repeater for all objects of your ArrayCollection? Use a custom component.

dirkgently
i dont necessarily need to use a repeater, my problem is that i dont know how else i can take an arraycollection and then loop through the contents of each row of the arraycollection whcih contain serveral values. A datagrid is not suitable for my needs either
combi001
As I suggested earlier, create a custom component. There are several types of them -- MXML, pure AS based etc. Take a look at the documentation.
dirkgently