It friends,
How can I load a drop down box with pre-selected item?
Here is my dropdown box
[Bindable]
public var items:ArrayCollection = new ArrayCollection(
[ {label:"Item 1", data:"item1"},
{label:"Item2", data:"item2"},
{label:"Item3", data:"item3"},
{label:"Item4", data:"item4"},
{label:"Item5", data:"item5"} ]);
<mx:ComboBox id="myCombo" dataProvider="{items}" width="121"></
mx:ComboBox>
Now lets say I have a variable which have a value item3, than I want
that when the mxml loads the Item 3 should be pre selected, I am doing
something like this
var selected: String = ''item3;
myCombo.selectedItem.data = selected;
Could you please suggest what I am doing wrong, or what should I do ?
Thanks,
Jaswant
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.