1 Reply Latest reply on Mar 14, 2011 3:14 AM by samschauhan

    Add data to an arraycollection without lossing other data

    AMIR820321548863

      Hello

       

      I have the following arraycollection,

      Header 1

      private

       

       

      {label: "2017"}, {label: "2018"}, {label: "2019"},

      {label:

      "2020"}, {label: "2021"}, {label: "2022"}, {label: "2023"}, {label: "2024"}, {label: "2025"}, {label: "2026"}, {label: "2027"}, {label: "2028"},

      {label:

      "2029"}, {label: "2030"}, {label: "2031"}, {label: "2032"}, {label: "2033"}, {label: "2034"}, {label: "2035"}, {label: "2036"}, {label: "2037"},

      {label:

      "2038"}, {label: "2039"}, {label: "2040"}, {label: "2041"}, {label: "2042"}, {label: "2043"}, {label: "2044"}, {label: "2045"}, {label: "2046"},

      {label:

      "2047"}, {label: "2048"}, {label: "2049"}, {label: "2050"}]);

       

      var listDB:ArrayCollection=new ArrayCollection();([{label: "2011"}, {label: "2012"}, {label: "2013"}, {label: "2014"}, {label: "2015"}, {label: "2016"},

      This arrayCollection is use as a dataprovider for a list component.

       

      I want to add additional data to a specific cell in the the arraycollection, without losing

      any data from that cell.

       

      Meaning that if in my cell  listDB[0] has {label: "2011"} I want during runtime to add {name: "car"}

      So it will be {label: "2011" ,name: "car"};

      How can I do that?

       

      Thanks