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
350
Javascript to reset the WebComboBox
posted

Within code behind, it is real easy to reset the combobox to a selected value of nothing combobox.selectedIndex = -1, I have tried multiple things to recreate this within javascript but can not seem to accomplish the same thing.

Does anyone know how to do this within javascript?

 

Thank you

Matthew Contri

Parents
No Data
Reply
  • 10880
    Verified Answer
    posted

    I am putting the solution from the support case here so that everyone can find it in a search.

    You can clear the selection and value by using the setValue method of the WebCombo. It would look something like this:
    var combo = igcmbo_getComboById("<%=WebCombo1.ClientID %>");
    combo.setValue(null);

Children