Hi,
I am having a weird problem when I am trying to use a messagebox or inputbox in my DayView AppointmentMoved Event. If I do as follows the moved actually gets cancelled and moves back to its original position.
HOW IS THIS SO??? I can't see why this is happening.
Private Sub UltraDayView1_AfterAppointmentsMoved(ByVal sender As Object, ByVal e Infragistics.Win.UltraWinSchedule.AfterAppointmentsMovedEventArgs) Handles UltraDayView1.AfterAppointmentsMoved
MessageBox.Show("test messagebox", "Test", MessageBoxButtons.OK, MessageBoxIcon.Information)End SubSecondly: Is it possible to only capture the FINAL MOVING POSITION of the appointment? By this I mean, when a user drags an appointment to a new location (whether it be on a different date, different time, different owner)... as the user drags it around the screen each time the appointment "slots" into a new timeslot it seems to fire the AppointmentMoved event.Is it possible to fire the AppointmentMoved Event ONLY ONCE THE USER has released thier mouse button (Hence the appointment is in it's final resting place) in effect stopping the firing of the appointmentmoved event whilst the user is dragging the appointment across the screen to the new location?
My end goal is to VALIDATE the appointment once it is in its original position. I am storing a copy of the "Original" appointments in a business class - these are captured at the "BeforeAppointmentMoved" event. Once it is moved then validate. If it does not validate then change the appointment back to the original values.
BeforeAppointmentMovedStore All 'about to be moved appointments' into a class
AfterAppointmentMoved Validate Appointment
If Validate = OK then Do NothingElse Prompt user for password to override validation If Password = OK then Do Nothing Else Change appointment Values back to original values End ifEnd If Thanks In Advance.
Showing a MessageBox (which is modal) in response to the AfterAppointmentMoved event causes the capture to be ripped away from the control, making it impossible to continue a drag operation. When a drag operation is terminated abnormally, the appointment's StartDateTime and EndDateTime properties revert to their original values.
The AppointmentsDragComplete event fires when a drag operation has been completed.
Thankyou thankyou thankyou!
My validation routine's complexity is just a fraction of what it was due to the discovery of this event.
Give me your boss's email address. I will harrass him to pay you more money :)
Thanks again Brian.