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

Copy Paste Appointment

12 Answers 111 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Maxence
Top achievements
Rank 1
Maxence asked on 05 Oct 2011, 06:16 AM
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

12 Answers, 1 is accepted

Sort by
0
Accepted
Boyan
Telerik team
answered on 06 Oct 2011, 09:57 AM
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 >>

0
Maxence
Top achievements
Rank 1
answered on 06 Oct 2011, 10:44 PM
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
0
Boyan
Telerik team
answered on 11 Oct 2011, 04:30 PM
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 >>

0
Maxence
Top achievements
Rank 1
answered on 14 Oct 2011, 06:58 AM
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

0
Boyan
Telerik team
answered on 18 Oct 2011, 11:55 AM
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 >>

0
Maxence
Top achievements
Rank 1
answered on 19 Oct 2011, 01:19 AM
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
0
Håkan
Top achievements
Rank 1
answered on 20 Oct 2011, 09:12 AM
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
0
Rosi
Telerik team
answered on 25 Oct 2011, 01:17 PM
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 >>

0
Metrik
Top achievements
Rank 1
answered on 25 Jan 2012, 10:41 PM
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.
0
Yana
Telerik team
answered on 30 Jan 2012, 04:23 PM
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 >>

0
srsri
Top achievements
Rank 1
answered on 24 Jan 2014, 04:42 PM
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.

0
Yana
Telerik team
answered on 29 Jan 2014, 08:32 AM
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 >>
Tags
ScheduleView
Asked by
Maxence
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Maxence
Top achievements
Rank 1
Håkan
Top achievements
Rank 1
Rosi
Telerik team
Metrik
Top achievements
Rank 1
Yana
Telerik team
srsri
Top achievements
Rank 1
Share this question
or