I have a problem handling BeforeAppointmentsMoved in UltraDayView.
When I drag an Appointment to a different TimeSlot AND to a different Owner during the same drag operation, BeforeAppointmentsMoved is fired twice.
It is really bad, because the 2nd time, when I get notified, the Owner on the Appointment has already been changed to the new Owner. But, the drag operation has not been completed yet, it is still in process, but the DayView notifies me of BeforeAppointmentsMoved and passes me the CancelableAppointmentsEventArgs, the Appointments collection within that has already been modified to have the new Owner, which is real bad, because I need to store the old Owner during the BeforeAppointmentsMoved event!
I am using Infragistics library version 7.1. Thanks in advance for your help.
UltraDayView exposes another event, AppointmentsDragComplete, which fires when a drag operation is completed. While what I am going to propose is not the most elegant solution, it should serve your purposes. You can maintain an external flag that you reset in AppointmentsDragComplete, so that you have an awareness of the first firing of the BeforeAppointmentsMoved event for a given drag operation. Incidentally, the BeforeAppointmentsMoved event is supposed to fire with each change in TimeSlot or Owner, so the behavior you describe here is actually by design.
Thanks Brian, I appreciate your response. That makes a lot of sense, all I need to do is handle the first firing of BeforeAppointmentsMoved.