vijayashankar palanichamy
Top achievements
Rank 1
vijayashankar palanichamy
asked on 07 Dec 2009, 12:38 PM
| <radCB:RadComboBox ID="ddlDecimals" runat="server" Skin="HSTM" Width="35px"> |
| <Items> |
| <radCB:RadComboBoxItem runat="server" Text="0" Value="0" /> |
| <radCB:RadComboBoxItem runat="server" Text="1" Value="1" /> |
| <radCB:RadComboBoxItem runat="server" Text="2" Value="2" Selected="True" /> |
| </Items> |
| </radCB:RadComboBox> |
| $(document).ready(function() { |
| var checkddl = $("[id$=ddlDecimals]"); |
| $("[id$=ddlDecimals]").change(function() { |
| alert(this.value); |
| }); |
| }); |
The change event is not firing for the radcombo please help me regarding this.
5 Answers, 1 is accepted
0
Majid Darab
Top achievements
Rank 1
answered on 09 Feb 2010, 07:55 AM
i exactly have the same problem
my pages base on master and content pages and in content pages i have multiviews and inside them i have RadComboboxes...
so i want to know how can i access those comboboxes with jquery ?
and
how can i get selectedindexchange event with jquery?
i test meny ways but they did not work...
i google it but all the ways are about default dropdown of vs 2008 not radcombobox...such as selected indexchange
i would be really really appreciate for helping me
my pages base on master and content pages and in content pages i have multiviews and inside them i have RadComboboxes...
so i want to know how can i access those comboboxes with jquery ?
and
how can i get selectedindexchange event with jquery?
i test meny ways but they did not work...
i google it but all the ways are about default dropdown of vs 2008 not radcombobox...such as selected indexchange
i would be really really appreciate for helping me
0
Hello Majid Darab,
To subscribe to the OnClientSelectedIndexChanged event you need to set that property either inline (in the aspx file) or in the code behind.
Alternatively you can use the add_selectedIndexChanged(handlername) client method to subscribe to that event as shown here: client-side events.
Also, do not use $(document).ready because the RadComboBox client object may not be initialized yet. Use pageLoad() or Sys.Application.add_load methods instead.
Greetings,
Veskoni
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
To subscribe to the OnClientSelectedIndexChanged event you need to set that property either inline (in the aspx file) or in the code behind.
Alternatively you can use the add_selectedIndexChanged(handlername) client method to subscribe to that event as shown here: client-side events.
Also, do not use $(document).ready because the RadComboBox client object may not be initialized yet. Use pageLoad() or Sys.Application.add_load methods instead.
Greetings,
Veskoni
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Majid Darab
Top achievements
Rank 1
answered on 09 Feb 2010, 02:08 PM
really appreciate it...
0
Sunil
Top achievements
Rank 1
answered on 01 Mar 2013, 04:15 AM
Hi,
I am using client side event for radcombobox as below
This event is firing but the value of item coming always same that is the first value.
So if i select any other item then also i am getting same value that is the first value.
Thanks,
Sunil
I am using client side event for radcombobox as below
function OnClientSelectedIndexChanged(sender, eventArgs) {
var item = eventArgs.get_item();
}
This event is firing but the value of item coming always same that is the first value.
So if i select any other item then also i am getting same value that is the first value.
Thanks,
Sunil
0
Princy
Top achievements
Rank 2
answered on 01 Mar 2013, 06:07 AM
Hello Sunil,
I tried your code but I am not able to replicate the issue and OnClientSelectedIndexChanged is working fine for me and new item is also retrieved in the JS code. Please have a look at the code I tried.
ASPX:
JavaScript:
If you have further issues, please provide your full code.
Thanks,
Princy.
I tried your code but I am not able to replicate the issue and OnClientSelectedIndexChanged is working fine for me and new item is also retrieved in the JS code. Please have a look at the code I tried.
ASPX:
<telerik:RadComboBox ID="RadComboBox" runat="server" AllowCustomText="true" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" Skin="Vista" EmptyMessage="Please select"> <Items> <telerik:RadComboBoxItem Text="Audi" /> <telerik:RadComboBoxItem Text="Bugatti" /> <telerik:RadComboBoxItem Text="Jaguar" /> <telerik:RadComboBoxItem Text="Lexus" /> </Items></telerik:RadComboBox>JavaScript:
<script type="text/javascript"> function OnClientSelectedIndexChanged(sender, args) { // To get the item var item = args.get_item(); //To get the item text var itemText = args.get_item()._text; }</script>If you have further issues, please provide your full code.
Thanks,
Princy.