Expand my Community achievements bar.

Delete existing drop-down list

Avatar

Level 2

Does anyone know if there is a way to delete all list items in a drop-down, instead of one by one?  I want to paste in a new list from excel, but delete the old one first.

Thanks

1 Reply

Avatar

Former Community Member

There is a clearItems() method on the Dropdown that will remove all items in the list. Note that if the user already selected something then you will also have to clear the rawValue property as well:

DDlist.rawValue = "";

DDlist.clearItems()

Hope that helps

Paul