1 Reply Latest reply on Aug 14, 2009 8:07 AM by Flex harUI

    "dynamic" datagrid & data provider

      my question : i had to create a "dynamic" datagrid component based on a dynamic dataprovider... i want to bind this dp & my datagrid


      Code :
      private var sourceDP:ArrayCollection;
      then in a function
      Code :
      monDataGrid = new DataGrid;
      monDataGrid.dataProvider = sourceDP;
      var cols:Array = monDataGrid.columns;    
      var currentColumn:DataGridColumn = new DataGridColumn();
      currentColumn.headerText = "tata";
      currentColumn.dataField = 'titi";
      sourceDP is initialized somewhere else and is correct (i made a datagrid in mxml which used it and it works)
      but in my dynamic AS3 datagrid no datas appeared  ...
      i supposed it's because the dp is not binded with the grid ...


      Do you know how to bind this in AS3 (in mxml it's very easy with {} but in AS3 ????)


      thank's a lot ...
      Reply in English or in French