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

Standard change event not fired for dropdownlists?

3 Answers 218 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 1
Glenn asked on 31 Dec 2013, 07:22 PM
Hello,

I have the exact same issue reported over two years ago here - http://www.telerik.com/community/forums/aspnet-mvc/combobox/dropdownlist-does-not-change-its-input-value.aspx

Using the plugin they are also using, I have found changes to dropdowns were not being tracked.  I believe the root of this issue is from this user's post:

"However, using .val() does not fire a change event. In html's select dropdown and not telerik's dropdown, selecting a different value fires a change event. In your case, you change the value via .val() but forget to trigger a change event which I think you should do via $('#').val().change();"

Telerik's reply back in sept 2011 was that this would be forwarded to the developers.  I am not interested in wiring up a valueChanged event handler to every dropdownlist, and was hoping to get an update on this issue.  Shouldn't telerik's dropdown follow the same event pattern as a standard html dropdown in terms of firing events?  If there's a reason it shouldn't, is there any global solution for this issue?


3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 03 Jan 2014, 12:08 PM
Hi Glen,

The forum post that you are referring to reference the combobox control of the ASP.NET MVC suit. If that is your case I would kindly ask you to post your question in the respective forums. Here is a list of the Telerik products that you can review. Let me know also if I am mistaken and you are referring to the RadcomboBox control of the ASP.NET AJAX suit.

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Glenn
Top achievements
Rank 1
answered on 03 Jan 2014, 05:26 PM
Sorry for the confusion.  This is related specifically to the telerik ASP.NET Ajax RadDropDownList.

The issue is summarized as below:

using .val() does not fire a change event. In html's select dropdown and not telerik's dropdown, selecting a different value fires a change event. In your case, you change the value via .val() but forget to trigger a change event which I think you should do via $('#').val().change();

0
Nencho
Telerik team
answered on 08 Jan 2014, 03:07 PM
Hello Glenn,

Thank you for contacting Telerik Support.

The RadDropDownList controls rendering differs from the standard html select. Therefore, we recommend the usage of the Client API of the control, where you could observe the for changing the selection of the control you could use the set_text() method (or get a reference to a specific item and use set_selected())  and for capturing a change of the value - you could use the OnClientSelectedIndexChanged

Hope this information helps. I will be glad to assist you any further.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ListBox
Asked by
Glenn
Top achievements
Rank 1
Answers by
Kate
Telerik team
Glenn
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or