1 Reply Latest reply on Apr 22, 2008 4:09 AM by peterskeeter

    Adding information dynamically to datagrid

      Alright, so I can get columns to dynamically add. Now I'd like to add in some information that will be changing dynamically. Here's The code I've got. It's returning a 1050 error, I think the error is because selectedItem is looking for something specific. By the way, I am trying to add this to a specific column. I might just be setting this whole application up backwards.
        • 1. Re: Adding information dynamically to datagrid
          peterskeeter Level 1
          I dynamically create an arraycollection to feed a DG.

          var w:ArrayCollection = new ArrayCollection();
          var newObj:Object = {} ;
          newObj["id"] = some_dynamic_value;
          newObj["firstname"] = some_other_dynamic_value;
          newObj["lastname"] = again_some_dynamic_value;

          This will create the arraycollection items 1 by 1 if you have the above code (after Arr Coll w is created) in a loop like I do.
          I then make w the DG dataprovider and bobs your uncle...