Combobox ClearSelection not working client side

3 posts, 0 answers
  1. CrazyBernie
    CrazyBernie avatar
    5 posts
    Member since:
    Feb 2007

    Posted 15 Nov 2011 Link to this post

    I am using a combox in the following scenario:

    1. LoadOnDemand items from a sharepoint list LISTDATA.svc
    2. We use the combox to filter the items on demand. 

    We then add the selected item to a listbox and wan't to let the user add another item . 

    Goal is that de combox selection is cleared after the item was added to the listbox. 

    Everything is client side using Javascript. 

    When I call the 

    combobox.ClearSelection() it gives me a method not defined error and the same goes for al other methods. However when I debug i do see that the combobox has all the items and properties that I would otherwise expect. 

    Any pointers ?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Nov 2011 Link to this post

    Hello,

    You can try the following javascript.
    JS:
    <script type="text/javascript">
      function OnClientClick()
      {
        var combo = $find("<%= RadComboBox2.ClientID %>");
        combo.clearSelection();
      }
    </script>

    Thanks,
    Princy.
  3. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 18 Nov 2011 Link to this post

    Hello Bernard,

    In the following help article all properties and methods of the Combo are listed: RadComboBox: Client Side Programming.

    Also, you could take a look at the Combo's LoadOnDemand modes demo at our website: RadComboBox: LoadOnDemand modes.

    Best wishes,
    Ivana
    the Telerik team
    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