开发者

Flex:how to disable particular item in combobox?

开发者 https://www.devze.com 2023-04-04 01:03 出处:网络
I have ComboBox With ArrayCollection as DataProvider. Data will come from Databse as ArrayCollection. I\'m Adding Item to ArrayCollection \"-Select Item-\" at 0th index and setting selected index=0 fo

I have ComboBox With ArrayCollection as DataProvider. Data will come from Databse as ArrayCollection. I'm Adding Item to ArrayCollection "-Select Item-" at 0th index and setting selected index=0 for combobox.

Flex:how to disable particular item in combobox?

My question is How to disable th开发者_如何学Pythonat(-select Course-) item?


I recommend you to use prompt property of DropDownList or ComboBox for that and combine it with selectedIndex = -1 as initial value.


Worst case an item renderer to show things as disabled. Then simply ignore the click if it has the property disabled. (this implies your list is overloaded with a property like isDisabled.

Mylist.selctedItem.isDisabled

0

精彩评论

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