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

Event Binding in Scheduler Custom Editor Template

1 Answer 156 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 16 Sep 2015, 12:44 AM

Hello,

I was wondering if there is a way to bind a click event within the custom editor template? I tried doing it the conventional way, where the click event triggers a function within my viewmodel. However, when I click on the button (which exists inside the template), I get this error message:

Uncaught TypeError: ((b.event.special[i.origType] || (intermediate value)).handle || i.handler).apply is not a function. 

Please advise.

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 17 Sep 2015, 07:18 AM
Hello George,

Please note that the edit template is bind to the currently edited scheduler event - that why the handler attached to the ViewModel is not visible in the current scope and error is thrown. Possible solution is to use the "edit" event of the scheduler to find the desired element and manually bind the handler.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Tony
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or