Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Properly clearing a selection (CSOM)

Hi all,


we're using the WebDropDown v9.2 and i'd like to know if anyone knows of a way to properly clear the selection. I'd need it to do the following in the latest Firefox release (3.5):

  • Clear the visible text
  • Clear the current value
  • Remove the selection in the list
  • Fire its Selectionchanging, Selectionchanged, Valuechanging, Valuechanged events


Thanks in advance,


  • 24671
    Suggested Answer

    Hi Dominik,

    Sorry for the delay. About your question, you can achieve that using the following code:

    dropDown.set_currentValue("", true);


    In case you are using multiple selection, you can still clear it on the client-side by iterating through the items and calling unselect on each one. 

    Events won't be fired in the above case, because client-side events for the controls are only fired when there is end-user interaction. If API for the CSOM is directly used, it is assumed that the Developer knows what's going on, so the events don't have to be raised. I.e. you can call your event handler there directly.

    Hope it helps. Please let me know if this solves your question, and whether i can help you with anything else.



Reply Children
No Data