1 Reply Latest reply on Feb 14, 2008 12:53 PM by jasonstout13

    List rows assing to an array - how?

    Tikis_Mikis
      Hello I'm having trouble getting all the data (all rows) in a list component to be assinged to an array to send to the server for processing in AS3/Flex

      [as]
      myListRows = new Array();
      myListRows = myListComponent.data;
      myListRows = myListComponent.dataProvider;
      myListRows = myListComponent.value;
      myListRows = myListComponent.listData;
      [/as]

      All the above DO NOT work....The following works but only when rows are selected byt he user:

      [as]
      myListRows = myListComponent.selectedItems
      [/as]

      does anyone know how to approach this?
        • 1. Re: List rows assing to an array - how?
          jasonstout13
          try this, if i understand what your tring to do.
          [as]
          myListRows = new Array();
          myListRows[myListRows.length] = myListComponent.data;
          myListRows[myListRows.length] = myListComponent.dataProvider;
          myListRows[myListRows.length] = myListComponent.value;
          myListRows[myListRows.length] = myListComponent.listData;
          [/as]
          with this you could call the elements like so
          myListRows[0] would be the myListComponent.data;
          myListRows[3] would be the myListComponent.listData;
          or this
          [as]
          myListRows = new Array();
          myListRows.push = ({data : myListComponent.data, dataProvider : myListComponent.dataProvider, value : myListComponent.value, listData : myListComponent.listData});
          [/as]

          with this you would call the elements like so
          myListRows[0]['data'] would be the myListComponent.data
          myListRows[0]['listData'] would be the myListComponent.listData

          that is if i under stand your question ...