0 Replies Latest reply on May 10, 2006 11:42 AM by theRealEverett

    newbie datagrid

      I have a flash form movie
      In the first form I have a datagrid called product_dg
      I have an as file assigned to the form
      I place the following code in the actionscript of the first frame of the movie it populates the datagrid.
      I put the same code in the as form it does NOT populate the datagrid.
      I do get the trace so I know the code is executing....
      What am I doing wrong?

      ********** code in as file
      import mx.controls.*;

      import mx.data.*;
      import mx.UIComponent.*
      class products extends mx.screens.Form

      public var product_dg:mx.controls.DataGrid;

      function products()


      function load()
      var myDP_array:Array = new Array();

      myDP_array.push({name:"Clark", score:3135});

      myDP_array.push({name:"Bruce", score:403});

      myDP_array.push({name:"Peter", score:25});

      product_dg.dataProvider = myDP_array;

      trace("product_dg is " + product_dg);