Copy and paste action in Scheduler

3 posts, 0 answers
  1. Jason
    Jason avatar
    12 posts
    Member since:
    Oct 2015

    Posted 10 Oct 2017 Link to this post


    Currently the scheduler has Clone Events to demonstrates how to clone events in the Scheduler. But how we can copy and paste an event on scheduler.


  2. Tyler
    Tyler avatar
    68 posts
    Member since:
    Feb 2017

    Posted 10 Oct 2017 in reply to Jason Link to this post

    What exactly is the purpose of this, or how were you thinking this would be done? 

    One thing you could do, is listen for keydown and keyup in the window, then when you detect ctrl+c, you copy the selected event (which you grab in the change event of the scheduler, when a user clicks on an event, the change event fires and that event will be available in the change event) by cloning it into a new event. Then, have the user click some new time slot, and when you detect ctrl+v, add that 'copied' event to the dataSource, sync the dataSource, and refresh the scheduler (or triggering your create method would probably be better).

  3. Ivan Danchev
    Ivan Danchev avatar
    2189 posts

    Posted 11 Oct 2017 Link to this post

    Hi Jason,

    The approach Tyler described is a possible way for copying ("cloning") events in the Scheduler. I'll post several links to the API, which could be helpful. You can get the currently selected event with the Scheduler's select event. The DataSource's has add and sync methods. An event can be added through the Scheduler's API with the addEvent and saveEvent methods. The Scheduler can be refreshed with its view method: scheduler.view(scheduler.view().name)

    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top