我想以预定方式将项目添加到下拉列表中。
我有一个空的下拉列表,根据许多因素,我会用各种动作选项填充它。
下拉列表被称为dlFirstChoice,我想为它添加一些值,有些人可以给我基本的代码,我已经厌倦了IList和Arrays作为Dataprovider,但显然我做错了。 / p>
请提前感谢您的帮助。
答案 0 :(得分:0)
var dropListDb:ArrayList=new ArrayList();
dropListDb.addItem({label: "Equals (List)"});
dropListDb.addItem({label: "Is Between"});
dlFirstChoice.visible = true;
dlFirstChoice.dataProvider=dropListDb;
dlFirstChoice.selectedIndex=0;