Completed
Last Updated: 12 Sep 2016 05:33 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 13 Nov 2015 09:29
Category: Scheduler/Reminder
Type: Bug Report
0
FIX. RadScheduler - EditRecurrenceDialog is not shown when start editing a recurring appointment by double clicking
Note: If you open the context menu over a recurring  appointment and select "Edit Appointment", when the EditAppointmentDialogis shown, the EditRecurrenceDialog is shown as well. But when the EditAppointmentDialog is shown by double clicking, the EditRecurrenceDialog  is not opened at all.

Workaround:
 this.radScheduler1.SchedulerInputBehavior = new CustomBehavior(this.radScheduler1);

public class CustomBehavior : SchedulerInputBehavior
{ 
    public CustomBehavior(RadScheduler scheduler) : base(scheduler)
    {
    }

    public override bool HandleAppointmentElementDoubleClick(object sender, EventArgs args)
    {
        MouseEventArgs mouseArgs = args as MouseEventArgs;
        if (mouseArgs == null || mouseArgs.Button != MouseButtons.Left)
        {
            return false;
        }
        FieldInfo fi = typeof(SchedulerInputBehavior).GetField("beginEditTimer", BindingFlags.NonPublic| BindingFlags.Instance);
        Timer beginEditTimer = fi.GetValue(this) as Timer;
        beginEditTimer.Stop();

        if (!this.Scheduler.ReadOnly && sender is AppointmentElement)
        {
            AppointmentElement app = sender as AppointmentElement; 
            this.Scheduler.ShowAppointmentEditDialog(app.Appointment, app.Appointment.MasterEvent != null);
        }

        return false;
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Ralitsa
Posted on: 12 Sep 2016 05:33
We consider that the EditRecurrenceDialog should not be visible when double clicking or choose 'Edit Appointment' option from context menu of single occurrence.  All fields for editing the occurrence are available in the EditAppointmentDialog. The same behavior is observed with Microsoft Outlook Calendar too. 
If you still need to show the EditRecurrenceDialog on double click, you can use the suggested workaround in the issue`s description. Alternatively, you can subscribe to the AppointmentEditDialogShowing event and show it. Please refer to the code snippet below how to achieve it:

bool flag = false;
void radScheduler1_AppointmentEditDialogShowing(object sender, Telerik.WinControls.UI.AppointmentEditDialogShowingEventArgs e)
{       
    if (flag)
    {
        return;
    }
    else
    {
        e.Cancel = true;

        flag = true;
        radScheduler1.ShowAppointmentEditDialog(e.Appointment, e.Appointment.MasterEvent != null);
        flag = false;
    }
}