This is a migrated thread and some comments may be shown as answers.

Combobox ClearSelection not working client side

2 Answers 279 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
CrazyBernie
Top achievements
Rank 1
CrazyBernie asked on 15 Nov 2011, 10:24 AM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Nov 2011, 01:23 PM
Hello,

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

Thanks,
Princy.
0
Ivana
Telerik team
answered on 18 Nov 2011, 08:54 AM
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
Tags
ComboBox
Asked by
CrazyBernie
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ivana
Telerik team
Share this question
or