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?

    Thanks,
    -Pete
  2. Answer
    Rosen
    Admin
    Rosen avatar
    3234 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) {
      e.preventDefault();
       
      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
      scheduler.editEvent(event); 
    });

    Here you can find a sample of such approach.
    Regards,
    Rosen
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top