开发者

set SelectedItem in DropDownList FLEX

I am making some simple project and I h开发者_如何学JAVAave problem with selectedItem. I have sth like this

<s:State name="Form" enterState="makesService.send()"/>

so when I enter this state I take makes from database and populate them to dropdownlist.

but I have also button and on click event I'm changing state to this Form and I want to select specific make from the dropdownlist but I can't. I'm not sure whether I'm doing sth wrong or the problem is that I'm selecting item just before the dropdownlist became populated.

e.x. List of make consist of Audi and BMW and when I click button I want to open this state Form in which this dropdownlist exist with selected value e.x. BMW.

How to make this the easiest way ?


Well from what I understand, first of all, when clicking the button and selecting the "Form" state you ought to check whether or not you have data that populates the dropdown item, so as not two make the call each time you enter this state.
The next this is to use the selectedIndex or selectedItem property of the dropdown list component.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜