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

how to set default value

1 Answer 149 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ashok
Top achievements
Rank 1
Ashok asked on 08 Sep 2010, 08:21 AM
Hi Team

i have Radcombobox

 

<telerik:RadComboBox ID="Test" runat="server" EmptyMessage="Select"

 

 

EnableLoadOnDemand="true" EnableVirtualScrolling="true" Filter="Contains"

 

 

onKeyDown="if(event.keyCode==13) event.keyCode=9;" ItemsPerRequest="20" ShowMoreResultsBox="true"

 

 

TabIndex="133" Width="200px">

 

 

</telerik:RadComboBox>

if i click Clear button i need to set like select in dropdown.
i used like but not working

 

Test.SelectedIndex = -1;
Test.Selectedvalue="";
Test.Selectedvalue=0;
not working ...

Give me the Solution as soon as possible..

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Sep 2010, 01:10 PM
Hello,


Setting the SelectedIndex worked for me in selecting an item in the list. If you want to clear the RadComboBox, then try the the ClearSelection() method and see whether it helps.

Code:
      RadComboBox1.ClearSelection();


Shinu.
Tags
ComboBox
Asked by
Ashok
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or