I've been trying to change the selected the item in a radcombox using the following java script code and none of it works:
var
comboBox = <%=rc1.ClientID %>;
comboBox.set_Text =
""
;
//document.getElementById("<%=rc1.ClientID %>").value = "";
var
ddlQType = $find(
"<%=rc1.ClientID%>"
);
ddlQType._text =
""
;
ddlQType.set_selectedItem =
""
;
What am I doing wrong?
Thanks
6 Answers, 1 is accepted

Try accessing the item using 'findItemByText' method and call the select() method to select the item.
More information on client side methods will be available here:
Client-Side Basics
RadComboBox object
RadComboBoxItem object
-Shinu.

function stopPropagation(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
}
<telerik:radcombobox ID="rcChannels" runat="server" Width="140px" Skin="epsilon" height="180px"
EnableEmbeddedSkins="false" DropDownWidth="200px" HighlightTemplatedItems="True" >
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox" onclick="stopPropagation(event);" Text="" /> <%# DataBinder.Eval(Container, "Text") %>
</ItemTemplate>
</telerik:radcombobox>
Could you try to explain what exactly you are trying to achieve, since I'm not quite sure what you are aiming for as a functionality?
Best wishes,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.


comboBox.set_value("");
Hi,
Here is an additional example that may be used:
Using "previous" and "next" buttons to change/switch the selected items of RadComboBox in client side:
Sample markup for the buttons and combo.
<telerik:RadComboBox ID="RadComboBox1" runat="server" RenderMode="Lightweight">
<Items>
<telerik:RadComboBoxItem Text="Item 1" Value="Item1" />
<telerik:RadComboBoxItem Text="Item 2" Value="Item2" />
<telerik:RadComboBoxItem Text="Item 3" Value="Item3" />
<telerik:RadComboBoxItem Text="Item 4" Value="Item4" />
</Items>
</telerik:RadComboBox>
<br />
<br />
<telerik:RadButton ID="prevBtn" runat="server" Text="Prev" AutoPostBack="false" OnClientClicked="previous"></telerik:RadButton>
<telerik:RadButton ID="nextBtn" runat="server" Text="Next" AutoPostBack="false" OnClientClicked="next"></telerik:RadButton>
JavaScript - Click handlers for the buttons.
<script type="text/javascript">
function previous(sender, args) {
// reference the combobox
var combo = $find('<%=RadComboBox1.ClientID %>');
// do nothing if the current selected index is the first item
if (combo.get_selectedIndex() === 0) return;
// access the next/potential combobox item by index (decrease the current index by one)
var previousComboItem = combo.get_items().getItem(combo.get_selectedIndex() - 1);
// select the item
previousComboItem.select();
}
function next(sender, args) {
// reference the combobox
var combo = $find('<%=RadComboBox1.ClientID %>');
// do nothing if the current selected index is the last item
if (combo.get_selectedIndex() === combo.get_items().get_count() - 1) return;
// access the next/potential combobox item by index (increase the current index by one)
var nextComboItem = combo.get_items().getItem(combo.get_selectedIndex() + 1);
// select the item
nextComboItem.select();
}
</script>
Kind
Regards,
Attila Antal
Progress Telerik