2 Replies Latest reply on Nov 12, 2009 3:39 AM by Jaishah11

    Not able to add object in flex using variables

    Jaishah11

      Hello,

       

      I am trying to add the object in an arraycollection in the following way

       

      var var1:String = 'Column1';

      arraycollection.addItem({var1:"test1"});

      arraycollection.addItem({var1:"test2"});

       

      I need the array collection to have data like

      Column1: test1

      Column1:test2

       

      However, by the above code, the array collection stores the following value

       

      var1:test1

      var1:test2

       

      Actually, I will come to know about the columns names in run time and I have to map this array collection to the datagrid.

       

      Please advice.

       

      Best Regards,

      Jai Kishan Shah

       

      http://bonjour.manjil-groups.com/