2 Replies Latest reply on Aug 31, 2010 12:02 PM by IlyaG

    ArrayList question

    IlyaG Level 1



      I need to create array list and provide him with my array, and I want to be able to get it threw my item renderer that I created for my dataGrid


      this is the item renderer


      <?xml version="1.0" encoding="utf-8"?>
      <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
           <s:Label id="lblData" top="0" left="0" right="0" bottom="0" text="{data[0]}" />



      this is the datagrid



      <mx:DataGrid x="19" y="271" width="525" height="291" id="tableList" dataProvider="{test}">
                <mx:DataGridColumn headerText="Cool" itemRenderer="test"/>




      And this is my declarations:


      private var test:ArrayList = new ArrayList(array1);
      private var array1:Array = [10,20,30];