Skip to content

Replies

0
Ian
Ian answered on Sep 27, 2010 6:59 PM

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.

 

function ctl00_ddlReason_DropDownOpening(sender, eventArgs)
{
var items = sender.get_items();
var item = sender.get_items().getItem(0);
var value = item.get_text();
if (value == 'Please select the reason for the down time.') {
items.remove(item);
}
}