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

    ArrayList question

    IlyaG Level 1

      Hi,

       

      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" 
                                      xmlns:s="library://ns.adobe.com/flex/spark" 
                                      xmlns:mx="library://ns.adobe.com/flex/mx" 
                                      focusEnabled="true">
           <s:Label id="lblData" top="0" left="0" right="0" bottom="0" text="{data[0]}" />
      </s:MXDataGridItemRenderer>
      
       
      

       

       

      this is the datagrid

       

       

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

       

       

       

      And this is my declarations:

       

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