1
     <telerik:RadComboBox ID="rbt" runat="server" Skin="Office2010Black"   AllowCustomText="true" CheckBoxes="True" EnableCheckAllItemsCheckBox="true"  Width="125px" TabIndex="7" MarkFirstMatch="true" ToolTip="Select" EmptyMessage="Select" Height="100px" Filter="StartsWith">
   <Items>   
   <telerik:RadComboBoxItem runat="server" Text="High" Value="High" /> 
   <telerik:RadComboBoxItem runat="server" Text="Medium" Value="Medium" /> 
   <telerik:RadComboBoxItem runat="server" Text="Low" Value="Low" />
   </Items>
 </telerik:RadComboBox>

I tried in code behind:

public void call()
       {
        rbt.ClearSelection();
        rbt.Text = "Select";
       }

I could not clear selection with the above code. I want to uncheck selected Items of a radcombo box when call() function is called. Appreciate if anyone can tell if anything is missing.

Pyd
  • 6,017
  • 18
  • 52
  • 109

2 Answers2

0

You can clear the items in the RadComboBox by using Clear server side method.

C#:

RadComboBox1.Items.Clear();
Ravikumar
  • 613
  • 1
  • 9
  • 22
  • If I use this it will delete all combobox items. My combobox has definite values and hence values of dropdown will not change dynamically. I want to deselect the selected values. – Pyd Aug 10 '17 at 04:28
0

with:

using Telerik.Web.UI; 

The following code in code behind resolved my problem of deselecting values of combobox:

public void call()
           {
            if (rbt.CheckedItems.Count > 0)
                {
                    foreach(RadComboBoxItem rcbItem in rbt.Items)
                    {
                        rcbItem.Checked = false;
                    }              

                }
           }
Pyd
  • 6,017
  • 18
  • 52
  • 109