2 Replies Latest reply on Jan 10, 2010 8:04 PM by flexy8

    Accessing Objects in ArrayCollection on List component?

    flexy8 Level 1

      I had an ArrayCollection type variable (myData) that serves as a dynamic dataProvider. Tried working it with a Datagrid and it is working as expected but when I plugged it in to a List, I get the [object Object] rows. Why is that?

       

      here's my code snippet:

      ...
      for each (var item:Object in myResponder.lastResult)
      {
           myData.addItem({id:item.id, 
                name:item.name});
      }
      ...
      
      <mx:DataGrid dataProvider="{myData}">
           <mx:columns>
                <mx:DataGridColumn dataField="name"/>
           </mx:columns>
      </mx:DataGrid>
      
      <s:List dataProvider="{myData}"></s:List>