5 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 31 May 2011, 07:11 AM
Hello Naresh,
Try the following code by attaching OnClientSelectedIndexChanged event. Hope this helps you.
aspx:
Javascript:
Thanks,
Princy.
Try the following code by attaching OnClientSelectedIndexChanged event. Hope this helps you.
aspx:
<
telerik:RadComboBox
ID
=
"Combo"
runat
=
"server"
OnClientSelectedIndexChanged
=
"OnClientSelectedIndexChanged"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"Rice"
Value
=
"1"
/>
<
telerik:RadComboBoxItem
Text
=
"Wheat"
Value
=
"2"
/>
<
telerik:RadComboBoxItem
Text
=
"Sugar"
Value
=
"3"
/>
</
Items
>
</
telerik:RadComboBox
>
Javascript:
<script type=
"text/javascript"
>
function
OnClientSelectedIndexChanged(sender, args)
{
alert(args.get_item().get_text());
}
</script>
Thanks,
Princy.
0

Naresh
Top achievements
Rank 1
answered on 02 Jun 2011, 12:04 PM
Princy ,
Thanks for your time on this.My Query here is to get the selected Item text not all the text.
Thanks for your time on this.My Query here is to get the selected Item text not all the text.
0

Princy
Top achievements
Rank 2
answered on 02 Jun 2011, 02:05 PM
Hello Naresh,
The RadControls accepts two parameters as its arguments, sender and arguments. In SelectedIndexChanged event (client side) you can directly access the seleced text via "args.get_item().get_text()". You can also access the item using sender as shown below.
Javascript:
Check the following help article which explains more about this.
Client-Side Basics.
Thanks,
Princy.
The RadControls accepts two parameters as its arguments, sender and arguments. In SelectedIndexChanged event (client side) you can directly access the seleced text via "args.get_item().get_text()". You can also access the item using sender as shown below.
Javascript:
function
OnClientSelectedIndexChanged(sender, args)
{
var
combo = sender;
alert(combo.get_selectedItem().get_text());
}
Check the following help article which explains more about this.
Client-Side Basics.
Thanks,
Princy.
0

Mujeeb
Top achievements
Rank 1
answered on 10 May 2014, 12:34 AM
Hi Team Telerik,
I have two rad combo box in the ASP.NET Ajax web form.
Depending on the first radcombobox value, i need to make the second radcombobox selected.
How can we do this programatically?
Thank You and Kind Regards
Mujeeb
I have two rad combo box in the ASP.NET Ajax web form.
Depending on the first radcombobox value, i need to make the second radcombobox selected.
How can we do this programatically?
Thank You and Kind Regards
Mujeeb
0

Princy
Top achievements
Rank 2
answered on 12 May 2014, 04:10 AM