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

[Solved] Setting Value In RadCombo Box Using JavaScript

4 Answers 170 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Abhinaw Kaushik
Top achievements
Rank 1
Abhinaw Kaushik asked on 07 Aug 2009, 03:06 PM
Hi,

I am using Telerik RadCombo Box. My ComboBox is a bound Combo box. Depending on some logic I am calculating one result. Now i wanted to set that result as the selected Item of that RadCombo Box.

Anyone, any idea....pls let me know.

Thanks in Advance

Abhinaw Kaushik

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Aug 2009, 06:41 AM
Hi Abhinaw,

Try the following code in order to select RadComboBoxItem from client side.

JavaScript:
 
<script type="text/javascript"
function selectedItem() 
     var combo = $find("<%= RadComboBox1.ClientID %>");       
     comboItem = combo.findItemByText("RadComboBoxItem5"); // Give ComboItem text based on criteria
     combo.trackChanges();      
     comboItem.select(); 
     combo.commitChanges(); 
     comboItem.select(); 
</script> 
Also checkout the following link to know more about methods and properties of RadComboBox client object.
RadComboBox object
RadComboBoxItem object

-Shinu.
0
Abhinaw Kaushik
Top achievements
Rank 1
answered on 11 Aug 2009, 04:26 AM
Hi Shinu,

I have tried this code but I am recieving an error telling....Object doesnot support this property or method.

Any idea....

Thanks
Abhinaw
0
Brad
Top achievements
Rank 2
answered on 15 Mar 2010, 09:28 PM
I'm trying to find a combobox inside a table inside a formview. I want to set that value to a value which has been selected in a radgrid on the same page. I can get the values from the radgrid but I can't get to the combobox. Any example code out there how to do this? By the way, I need to do this in javascript and I'm also running into the code block issues.

Thanks,

Joe B
0
Veselin Vasilev
Telerik team
answered on 17 Mar 2010, 01:08 PM
Hi Joe,

You can use the OnClientLoad event of the combobox to easily get a reference to its client side object

All the best,
Veskoni
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
Abhinaw Kaushik
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Abhinaw Kaushik
Top achievements
Rank 1
Brad
Top achievements
Rank 2
Veselin Vasilev
Telerik team
Share this question
or