ljonny18
11-22-2006, 01:22 PM
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.
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.