Call Scheduler events from EventTemplate

2 posts, 1 answers
  1. Peter
    Peter avatar
    22 posts
    Member since:
    Nov 2007

    Posted 06 Nov 2013 Link to this post

    I'm using an EventTemplate to display in the agenda view.  I'd like to add a button in the template that will open the Edit window.  I've searched through the forums, but have not been able to find an example.  Can you provide an example showing how to do this?

  2. Answer
    Rosen avatar
    3253 posts

    Posted 07 Nov 2013 Link to this post

    Hello Peter,

    In order to achieve this you will need to use the Scheduler API's editEvent passing the event instance. For example:

    $("#scheduler").on("click", ".k-task .k-edit", function(e) {
      var uid = $(this).closest(".k-task").data("uid"); // get the uid of the Event from the item's data attribute 
      var event = scheduler.occurrenceByUid(uid); // retrieve the event instance via the Scheduler

    Here you can find a sample of such approach.
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top