I have two WebDropDown controls that are being initialized with a dummy item similar to "Please select X from the list". I don't want those dummy entries to show up in the list when they open it. I was hoping there would be some sort of NullText property for the CurrentValue like the ones in the TextEditor controls, but I haven't found anything like that. Any help would be greatly appreciated!
Thanks, Ian.
After a lot of searching I found some posts that pointed me in the right direction. Here is how you remove an item from the dropdown. In my case it's the first item in the list. After you remove the item the DropDownOpening event fires again, so you need to use some sort of criteria to make sure you do't remove all of the items from the list.
you can just hide the item visually by setting it's style attributes display to 'none' and visibility to 'hidden'
var item = sender.get_items().getItem(0);
item._element.style.display='none';
hope it helps,
Angel