PDA

View Full Version : How To Hide Some Values In Dropdown For Simple Combo Box?



thejoker101
29 Mar 2011, 7:46 AM
This seems easy, but I'm not figuring it out...

I have a SimpleComboBox that I load with some values from an Arrays.asList(). That's all fine.

In my application, I sometimes don't want to show all the values of the dropdown as they are sometimes not applicable to what's going on. What's the correct way to do this?

I don't want to remove them because then I'd have to add them back later on. There doesn't seem to be a simple way to just hide a value in the dropdown of the combo. I was thinking I could filter the value out of the store and then clear the filter when I want it back in. Thoughts? Examples?

Ersmarker
7 Apr 2011, 10:30 PM
If you use a ComboBox instead of a SimpleComboBox you can use a store and filters.

sven
7 Apr 2011, 11:14 PM
If you use a ComboBox instead of a SimpleComboBox you can use a store and filters.

Filters work on a SimpleComboBox too.