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

Modifying the events attached to 'Save' button on scheduler modal

1 Answer 494 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 14 Dec 2015, 04:09 PM

Hello,

 

I'm trying to configure a set of user roles in my kendoUI scheduler. These roles depend on the result of a function that fires when the modal for a particular event is fired. I need to change the event handler on the "Save" button depending on the result of this function.

 

My current approach is adding an event to the save button as follows:

In my scheduler declaration:

edit: function(e) {

    $(".k-scheduler-update").on('click', function () {
                console.log("Click event on kendo update worked.");
            });

}

 

I've tried this with a setTimeout, and in the change: endpoint of the scheduler API. How do I set up custom events on a save button of the scheduler modal after said modal has been opened and my user role function has been evaluated?

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 16 Dec 2015, 08:57 AM
Hello Andrew,

You can use the "save" event of the Scheduler which is triggered when the user clicks on the "Save" button. Additionally if you need to attach different event handler for each event you can attach it inside the "edit" event as follows:

edit: function(e) {
    var event = e.event;
    this.one("save", function() {
        alert(event.title);
    });
}

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
Andrew
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or