Dhamodharan
Top achievements
Rank 1
Dhamodharan
asked on 05 Apr 2011, 11:45 AM
Hi,
I want particular index item values in radcombobox in client side. in code behind we have get easily like ddlCountyName.Items(1).Text but how to get the same in client side.
Please give me a tips for this one.
Thanks,
Dhamu.
I want particular index item values in radcombobox in client side. in code behind we have get easily like ddlCountyName.Items(1).Text but how to get the same in client side.
Please give me a tips for this one.
Thanks,
Dhamu.
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 05 Apr 2011, 12:44 PM
Hello Dhamu,
You can access the RadComboBoxItem with index value like below.
javascript:
Thanks,
Shinu.
You can access the RadComboBoxItem with index value like below.
javascript:
function
accessItem()
{
var
combo = $find(
"<%= RadComboBox1.ClientID %>"
);
var
item = combo.get_items().getItem(2);
//accessing the item using the index
alert(item.get_text());
}
Thanks,
Shinu.
0
Dhamodharan
Top achievements
Rank 1
answered on 05 Apr 2011, 12:50 PM
Hi Shinu,
Thanks for your quick reply.
I have two radcombobox. i want set same selected index for two radcombox.
first i have get selected index from first combobox in client side. like combo.get_selectedIndex() in the same time i want set selected index into second combobox in first combox onclientselectedindexchanged event.
Please let me know.
Thanks,
Dhamu.
Thanks for your quick reply.
I have two radcombobox. i want set same selected index for two radcombox.
first i have get selected index from first combobox in client side. like combo.get_selectedIndex() in the same time i want set selected index into second combobox in first combox onclientselectedindexchanged event.
Please let me know.
Thanks,
Dhamu.
0
Princy
Top achievements
Rank 2
answered on 05 Apr 2011, 01:17 PM
Hi Dhamu,
I hope follwoing documentation links will be of help in this.
Client-Side Basics
RadComboBox Object
RadComboBoxItem Object
Regards,
Princy.
I hope follwoing documentation links will be of help in this.
Client-Side Basics
RadComboBox Object
RadComboBoxItem Object
Regards,
Princy.
0
Dhamodharan
Top achievements
Rank 1
answered on 05 Apr 2011, 01:27 PM
Hi Princy,
I am sure how to set selectedIndex for radcombobox.
I am using combo2.set_selectedIndex(combo1.get_selectedIndex()). but it is not working.
Please let me know if you have any other tips.
Thanks,
Dhamu.
I am sure how to set selectedIndex for radcombobox.
I am using combo2.set_selectedIndex(combo1.get_selectedIndex()). but it is not working.
Please let me know if you have any other tips.
Thanks,
Dhamu.
0
Shinu
Top achievements
Rank 2
answered on 06 Apr 2011, 07:51 AM
Hello Dhamu,
Try the following code to achieve the same.
Javascript:
Thanks,
Shinu.
Try the following code to achieve the same.
Javascript:
function
onClientSelectedIndexChanged(sender,args)
{
var
combo = sender
var
combo2 = $find(
"<%= RadComboBox2.ClientID %>"
);
combo2.clearSelection();
combo2.set_selectedIndex(combo.get_selectedIndex());
}
Thanks,
Shinu.