2 Replies Latest reply on Jan 3, 2008 12:07 AM by jono.r

    Adding and "empty" row to an ArrayCollection

    jono.r
      Hi,
      I've got an ArrayCollection named CompanyList which has been populated by a webservice.
      Each "row" structure is the same.

      I want to add a new row with the same elements as an existing row.
      I'm trying the followng, but of course the new row is being bound to the first row, which is powerfull... just not what I want!

      I'm hoping of course there's a simple way to do this :-)
      Can anyone enlighten me?

      var newRow:Object = companyList[0];
      companyList.addItem(newRow);
      companyList[companyList.length - 1].pkey = '0';
      companyList[companyList.length - 1].name = '';