6 Replies Latest reply on Jan 6, 2007 1:39 AM by newman_

    DataGrid and getItemAt

    newman_ Level 1
      Hi!

      I used in my DataGrid this code:

      <mx:itemRenderer>
      <mx:Component>
      <mx:VBox clipContent="false">
      <mx:Text text="{data.myid[data.myid.length()-1].toString())}" paddingLeft="5" paddingRight="5" />
      </mx:VBox>
      </mx:Component>
      </mx:itemRenderer>

      It works! BUT...I get Warning message: " For Array, please use ArrayCollection.getItemAt() instead." I tried to change my code:

      <mx:Text text="{data.myid.getItemAt(data.myid.length()-1).toString())}" paddingLeft="5" paddingRight="5" />

      It doesn't work! :(
      I tried this:

      <mx:Text text="{data.dataProvider.myid.getItemAt(data.dataProvider.myid.length()-1).toString())}" paddingLeft="5" paddingRight="5" />

      It doesn't work too :(
      Can you tell me how to use getItemAt in my example???

      Marcin