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

How not to show the EditAppointmentDialog ?

3 Answers 82 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Sarah
Top achievements
Rank 1
Sarah asked on 01 Mar 2012, 02:06 PM
Hi!

Everything's in the title,  I want to totally disable the AppointmentEditDialogShowingEvent. Is that posible ?

Also, how can we retrieve the Start and End Time when clicking on an appointment ?

Thanks...

3 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 05 Mar 2012, 04:08 PM
Hi Sarah,

You could do the following:

1: Remove the Edit Appointment item from the context menu:
private void radScheduler1_ContextMenuShowing(object sender, SchedulerContextMenuShowingEventArgs e)
{
    if (e.Element is AppointmentElement)
    {
        e.ContextMenu.Items.RemoveAt(0);
    }
}


2: When the user double clicks an appointment to edit it, cancel this and grab the start and finish time instead.

private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
{
    MessageBox.Show("Starts at: " + e.Appointment.Start.ToString() + " Ends At: " + e.Appointment.End.ToString());
    e.Cancel = true;
}

Hope that helps.
Richard
0
Sarah
Top achievements
Rank 1
answered on 06 Mar 2012, 09:26 AM
Hi Richard, 

Thanks for the reply, it works perfectly! 

Sarah
0
Richard Slade
Top achievements
Rank 2
answered on 06 Mar 2012, 10:34 AM
Glad that helped! Please remember to mark as answer so others can find the solution too.
Regards,
Richard
Tags
Scheduler and Reminder
Asked by
Sarah
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Sarah
Top achievements
Rank 1
Share this question
or