4 Replies Latest reply on Jul 20, 2007 10:46 AM by dkerr

    return multiple values from a list box

    ljonny18 Level 1
      hi I have a listBox (<mx:List>) that is populated by a webService acting as its dataProvider ("myDataProvider")......

      within the listBox the value shown from the dataProvider is the "customerName", there is also a customerID values within the dataProvider.

      I have set the "allowMultipleSelection" equal to true so that more than one row / value can be selected.

      I want to retrieve all of the ID (customerID) valause from all of the selected rows within the listBox.

      if I use the following:
      var myObj:Object = new Object;
      myObj.id = myListt.selectedItem.CUSTOMERID;

      it works - but only returns 1 single ID value (the first selected etc) when I change "selectedItem" to "selectedItems" it does not return anything:

      var myObj:Object = new Object;
      myObj.id = myListt.selectedItems.CUSTOMERID;

      can anyone help me out here.... ?

      thanks,
      Jon.