0 Replies Latest reply on Aug 20, 2010 2:08 PM by Deh Bontempos

    adding property/field to an item inside array collection

    Deh Bontempos



      I'm newbie. But I'm spending a huge amout of time trying to figure out something that should be simple.


      in short:


      I wanted to add a new field/property to an item inside an arraycollection(ac).


      I thought something like:




      would do (its inside a loop, since I have ac.length) but it didnt.




      i think addItem, or addItemAt IS NOT THE CASE.


      I want to add an new item INSIDE the array that is wrapped in ac.



      in long:


      I have a ORDERS table that comes with a client_id (int).


      I need to retrieve the client's name from a CLIENTS table.


      Ok i have to put everything on the same datagrid. So, first i've tried to ivoke a function like this that would use the getClientsByID and return a string with its name.





      It didn't worked, maybe due to the syntax.


      SO, i thought i had to put all those 2 tables into 1 array collection to use this as a 'formated' data provider for the datagrid.


      What should I do? this is a simples example.


      Thanks a lot