Reset a DropDownList

3 posts, 1 answers
  1. Cyndie
    Cyndie avatar
    113 posts
    Member since:
    Jul 2010

    Posted 11 Jan 2012 Link to this post

    I have a series of cascading dropdownlists.  When the first one is changed, the second is updated based on the selection from the first list.  I would like for the 3rd and 4th to be reset to a blank list until the user selects a value from the second list (which will fire its change event and repopulate it).  I've tried to add the following in the change event for the 1st dropdown as I've seen on another forum post, but nothing is hidden when the event fires.  Is there a way to just clear out all of the entries in the list?  I didn't see a method in the doucmentation that appeared to do that.

    $("#devType").closest("k-widget").hide();

  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    2750 posts
    Member since:
    Sep 2012

    Posted 16 Jan 2012 Link to this post

    Hello Cyndie,

     
    You can clear the DropDownList widget using this code snippet:

    $("#dropdownlist").val("").data("kendoDropDownList").text("")

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!

  3. Cyndie
    Cyndie avatar
    113 posts
    Member since:
    Jul 2010

    Posted 16 Jan 2012 Link to this post

    Thank You!

Back to Top