Copy/Paste custom fields in RadScheduler
Environment
Product Version | Product | Author |
---|---|---|
2019.2.618 | RadScheduler for WinForms | Desislava Yordanova |
Description
When you have a custom implementation for the Appointment class, e.g. you extended the Appointment class with an Email field and try to copy/paste it, only the content of the basic Appointment class are being transferred. A common requirement is to copy/paste the Email field as well.
Solution
In order to copy/paste a custom field (e.g. Email) in the Appointment, you can store the value of the selected object in the AppointmentCopying event and assign the stored value in the AppointmentAdded event. Here is demonstrated a sample approach:
If you need to have full control on the copy/paste operations in RadScheduler, you can create a derivative of the SchedulerInputBehavior, override its HandleKeyDown method and execute the desired logic when the Control
key is pressed in combination with Keys.V or Keys.C:
Then, set the RadScheduler.SchedulerInputBehavior property to the custom behavior that you have: