How do I clear the RADComboBox via JQuery

5 posts, 0 answers
  1. Ray
    Ray avatar
    3 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    I'm trying to clear or reset the RAD ComboBox via JQuery and I just can't seem to find the right way to do it. I'm firing a click event on a radiobuttonlist that I would like to set the RADComboBox to nothing.I get into my click even, but that combobox just wont play nice. Here are the ways I have tried it...

    $('#<%=Me.cboCounterParty.ClientID %>').val("");
    $('#<%=Me.cboCounterParty.ClientID %>').val([]);
    $telerik.$('#<%=Me.cboCounterParty.ClientID %>').val("");
    $telerik.$('#<%=Me.cboCounterParty.ClientID %>').val([]);


    On a side note I am able to pull what's in the combobox via
    alert($telerik.$('#<%=Me.cboCounterParty.ClientID %>').val());

    Thanks!
  2. Ray
    Ray avatar
    3 posts
    Member since:
    Mar 2011

    Posted 29 Mar 2011 Link to this post

    var d = $find('<%=Me.cboCounterParty.ClientID %>');
    d.clearItems();
    d.set_text("");
  3. Calleigh
    Calleigh avatar
    9 posts
    Member since:
    Sep 2010

    Posted 30 Mar 2011 Link to this post

    You have to use:  var combo = $find("<%= cboCounterParty.ClientID %>");
    to get the RadComboBox client-side object.
  4. Matt
    Matt avatar
    97 posts
    Member since:
    Jun 2012

    Posted 30 May 2013 Link to this post

    I know that this post is old but for anyone else who finds it...

    All I get is "Error: Object doesn't support property or method..."

    So far, I have yet to find any current documentation and working links... this functionality must be a myth.
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 04 Jun 2013 Link to this post

    Hi Matt,

    The suggested code is working, but it cannot be used with enabled LoadOnDemand feature. I'm attaching small sample which shows how to use this code.

    Regards,
    Hristo Valyavicharski
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top