Copy Paste Appointment

13 posts, 1 answers
  1. Maxence
    Maxence avatar
    21 posts
    Member since:
    Aug 2011

    Posted 05 Oct 2011 Link to this post

    Hi Telerik Team,

    i would like to know if there is a way to copy paste a appointment (or custom appointment) or something similar ?
    the idea is to create an appointment on Monday morning and copy paste it from Tuesday to Friday mornings to have the same activity copied these several days. It's to procure a way to a user to do it more "graphically" and without using recurrency pattern.

    Regards,

    Maxence
  2. Answer
    Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 06 Oct 2011 Link to this post

    Hello Maxence,

    You can copy appointments in RadScheduleView by holding the CTRL key and dragging the appointment to the desired slot. Hope this works for you.

    Best wishes,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Maxence
    Maxence avatar
    21 posts
    Member since:
    Aug 2011

    Posted 06 Oct 2011 Link to this post

    Hi Boyan,

    thanks for the tip, it's nice feature. Meanwhile, how to assign other keys to this option ? and how to do it in code behind ?

    Regards,

    Maxence
  5. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 11 Oct 2011 Link to this post

    Hello Maxence,

    Unfortunately there is no way you could change the Ctrl key with something else. Alternative method is to create a RadContextMenu that have Copy and Paste RadMenuItems. More info on how to do this you can find in this example. Then on "Copy" copy the appointment and on "Paste" change the Start and End times of the copied appointment to the times of the selected slot and add it to the Appointment collection. If you are having troubles implementing this we will be glad to provide you a sample.

    Kind regards,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Maxence
    Maxence avatar
    21 posts
    Member since:
    Aug 2011

    Posted 14 Oct 2011 Link to this post

    Hi Boyan,

    thanks for your information and thanks for your proposition ! i'm always interesting if you can provide a sample for these 2 custom commands ;-)
    Meanwhile, the customer is used to the Ctrl+C(copy) and Ctrl+V(paste) keyboard shortcuts.
    This lead to errors  because these commands launch the "appointment created" event (that i use to retrieve the custom appointment and save it to database)  without displaying the appointmentShowDialog :
    • if Ctrl+C is made on a selected empty slot => error
    • if Ctrl+C is made on a selected non empty slot, no error but then when Ctrl+V is made => error

    is there a way to just not enabled this manipulation ? is there some logic i can made in code behind to detect these "wrong appointments created" because e.createdappointment is not null in "appointment created" event ?

    Thanks by advance,
    Regards,

    Maxence

  7. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 18 Oct 2011 Link to this post

    Hi Maxence,

    I can't understand exactly what you are trying to achieve with the AppointmentCreated event. Could you please open a new support ticket and attach a sample project so we can see what is wrong with your implementation.

    Best wishes,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Maxence
    Maxence avatar
    21 posts
    Member since:
    Aug 2011

    Posted 18 Oct 2011 Link to this post

    hi Boyan,

    sorry for my bad description. i just wanted to disable the "inline editing function" and finally i found how to do, i missed there is an option for that : IsInlineEditingEnabled=False. it's ok now

    Regards,

    Maxence
  9. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 20 Oct 2011 Link to this post

    Hi Boyan.

    How can I capture this event in code behind?
    If I select an appointment and use Ctrl + drag appointment to get a copy, is there any event to listen to?

    I have noticed that the CollectionChanged event on my view model's appointments are fired.
    But at that point, the appontment has not been copied yet, i.e. no values from the source appointment has been copied.

    I need to get a hold of the new appoinment after the copy has been made, to be able to set a few more properties on it and save it to my database.

    Regards,
    Håkan
  10. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 25 Oct 2011 Link to this post

    Hello Håkan,

    I suggest you review our DragDrop article. To implement the task I suggest you create a custom drag drop behavior and override the Drop or DragDropCompleted method.

    private void override DragDropCompleted(DragDropState state)
    {
     if(state.IsControlPressed)
     {
        //your logic.
     }
    }

    Regards,
    Rosi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  11. Metrik
    Metrik avatar
    4 posts
    Member since:
    Jul 2012

    Posted 25 Jan 2012 Link to this post

    Hello,

    Is there any way to make copy/paste work with standard keyboard shortcuts (CTRL-C/CTRL-V) ?
    When I paste with CTRL-V, it just creates a new Appointment but it doesn't copy the selected Appointment when CTRL-C was pressed.

    Regards.
  12. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 30 Jan 2012 Link to this post

    Hello Nichola,

    I've attached an example to demonstrate how you can implement the needed approach, please download the attachment and give it a try.

    Regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  13. srsri
    srsri avatar
    2 posts
    Member since:
    Mar 2013

    Posted 24 Jan 2014 Link to this post

    Hi,
    Is there any way to make copy/paste work with standard keyboard shortcuts (CTRL-C/CTRL-V) ?
    When I paste with CTRL-V, it just creates a new Appointment but it doesn't copy the selected Appointment when CTRL-C was pressed.

  14. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 29 Jan 2014 Link to this post

    Hello,

    Please check the project attached in the previous post - the same approach can be used with the latest version of RadScheduleView as well.

    Regards,
    Yana
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
DevCraft banner