05-09-2011 11:59 PM
I have a dropdown that is populated with a dataprovider containing 3 fields. Then I want to change the selectedItem (and label obviously) based on the user's saved settings.
The saved settings are strings from a DB. dp.getItemAt(0).currency is the saved variable.
This is what I've been trying to no avail:
var myObj:Object = new Object(); myObj.label = dp.getItemAt(0).currency; drpCurrency.selectedItem = myObj;
05-10-2011 08:50 AM
write a for-loop going through all your items in the dataprovider? as soon as you have the correct label, use break and set the selected item based on the loop-counter, i'd say
05-10-2011 09:34 AM