Flex:how to disable particular item in combobox?
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.
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
精彩评论