Completed
Last Updated: 08 Jan 2013 05:54 by ADMIN
ADMIN
Ivan Todorov
Created on: 08 Jan 2013 05:54
Category: Scheduler/Reminder
Type: Bug Report
2
FIX. When you drag an appointment in MonthView, its start time will be reset to 12:00AM
When you drag an appointment to a cell in MonthView, its start time will be reset to 12:00AM.

To workaround the issue, use the following code:

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.radScheduler1.SchedulerElement.DragDropBehavior = new MyDraggingBehavior(this.radScheduler1.SchedulerElement);
        }
    }

    class MyDraggingBehavior : AppointmentDraggingBehavior
    {
        public MyDraggingBehavior(RadSchedulerElement element)
            : base(element) { }

        public override bool Move(DateTime newDate)
        {
            if (this.Scheduler.ActiveViewType == SchedulerViewType.Month)
            {
                newDate = newDate.Add(this.ActiveFeedback.AssociatedAppointment.Start.TimeOfDay);
            }
            return base.Move(newDate);
        }
    }
0 comments