@(Html.Kendo().DropDownListFor(m => m)
...
.Events(e => e.Change("Method1").Change("Method2"))
)
Then only Method2 is called. I can work around this a little bit by creating a third function, but then if I need the "this" variable from the event it looks like I have to pass it as a parameter to Method1 and Method2.
Is it possible to have multiple handlers registered for one event on a kendo control?
5 Answers, 1 is accepted
Can this issue be related to this known problem? If so, note it has been verified and fixed shortly after our Q1 2015 release, and we apologize for the inconvenience it caused you. The fix is included in the latest internal build of the product, which is available for download from your Telerik account's > DevCraft Ultimate > UI for ASP.NET MVC product downloads section.
Please migrate to the new version and let us know whether this helps.
Kind regards,
Sebastian
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Thank you for your reply. I don't think my situation is the same as that bug. If I register one event handler for the change event, it works. If I register two event handlers for the change event, only the second one is called.
Thanks,
Brian
The Fluent API of the wrappers is designed to override previous setting when same method is called. In this case, the sacond Change call will override the previous one. This behavior is expected and the only to accomplish your goal is to either use 3rd function or wire the events manually using JavaScript.
Regards,
Georgi Krustev
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hi!
I have a grid with 2 ClientTemplate columns. Each has different html input tag, so I need 2 different DataBound event handlers. is it possible? I have 2 different javascripts for uploading a file and of course 2 different action in my controller.
The columns look like this:
.Columns(columns =>
{
columns.Template(@<text></text>).ClientTemplate("<input type='file' id='fileUpload' name='fileUpload' />");
columns.Template(@<text></text>).ClientTemplate("<input type='file' id='szamlaUpload' name='szamlaUpload' />");
})
I guess it's not possible to use in this case a .Event(e=>e.DataBound()) property of the grid, because it only allows 1 event handler. How can I use 2 different file upload in different columns?
Thanks
You cannot add two event handlers for the DataBound event using the Fluent API but you should not need to. I would suggest opening a new thread and explaining your scenario in more detail. You should be able to handle the logic related to Upload widgets in a single DataBound event handler.
Additionally, note that it is not advisable to use ids in Kendo UI item/column templates. This results in rendering multiple elements with the same ID, which is invalid HTML and could lead to unexpected behavior. If you need the id attribute to access the uploads via JavaScript/jQuery, you can replace them with a class name specific to the upload inputs.
Regards,
Tsvetina
Progress Telerik