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

Disable move event for specific appointment

1 Answer 177 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 22 Oct 2012, 11:34 AM
Hi,

is there a way to disable the move event for a specific appointment?

It seems that the recurring events already have this built in, but is there any way I can add this to my custom appointments?

Regards,
Philip

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 23 Oct 2012, 01:25 PM
Hello Philip,

Thank you for your question.

You can use the DragDropBehavior property of RadScheduler to manipulate the drag & drop operations. In your particular case, you should handle the Started event and stop the drag operation if the appointment is a custom one:
public Form1()
{
    InitializeComponent();
    this.radScheduler1.Appointments.Add(new Appointment() { Start = DateTime.Now, Duration = TimeSpan.FromHours(1), Summary = "Default" });
    this.radScheduler1.Appointments.Add(new CustomAppointment() {Start = DateTime.Now, Duration = TimeSpan.FromHours(1), Summary = "Custom" } );
    this.radScheduler1.DragDropBehavior.Started += new EventHandler(DragDropBehavior_Started);
}
 
void DragDropBehavior_Started(object sender, EventArgs e)
{
    if (this.radScheduler1.DragDropBehavior.ActiveFeedback.AssociatedAppointment is CustomAppointment)
    {
        this.radScheduler1.DragDropBehavior.Stop(false);
    }
}

Hope this helps. Do not hesitate to write back if you have any additional questions.

Greetings,
Ivan Todorov
the Telerik team
You’ve been asking for it and now it’s time for us to deliver. RadControls for WinForms Q3 2012 release is just around the corner. Sign up for a free webinar to see first all the latest enhancements.
Tags
Scheduler and Reminder
Asked by
Philip
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or