Hello, I am trapping the AppointmentsDragDrop event on an UltraMonthSingleView control. It gets fired when I release the mouse after the drag and drop, which is great. I can't seem to figure out how to know if I did a simple drag and drop (to move an appt) or a CTRL drag and drop (to copy the appt). How do I know the difference, or is there a better event that I should be using to trap moves and copies?
Thanks!
Chris
I would use Keydown event as well. Since by pressing CTRL will trigger Keydown event, i would set a variable and then will check for this variable in AppointmentsDragComplete event to determine if CTRL was pressed.
Well, that would work I suppose, and if that is the only option, I will go with it. Ultimately I need to know that an appointment was either moved or copied and I would hope that there would be some event fired (or some indication on the AppointmentsDragDrop event that tells me it is moved or copied).
Perhaps I am missing something more basic. Here's more background. I am storing my appointments in multiple backend systems, and I had a custom class and went down that road of databinding, but to databind properly I need the recurrence object and the appointment object built into my custom class, so that seems a bit pointless so I'm just using the AppointmentsCollection as my main data. In addition, dataninding doesn't address the issue of how to know something was added/changed/deleted. I would rather not keep a copy of the entire appoitment class and then compare the 2 when anything changes to see what was changed/added/deleted. So, perhaps there's a better event to trap. I am trapping the validateAppointments to deal with the Save button on the UI, and that all works fine. It would be nice if behind the scenes the draganddrop fired an appointment changed event(or even an appointment added and appointment deleted event) and a ctrl - drag fired just an appointment added event, and maybe there is something that does that that I am unaware of.
So, are there a combinaton of events that will cover an appointment being added, updated, or deleted that will work with draging and dropping; is there anyway to know on the dragdrop event that it was a copy and not a move; or am I stuck with trapping keydowns?
One was to tell is in the events after the drop has finished...
private void ultraDayView1_AppointmentsDragDrop(object sender, AppointmentsDragDropEventArgs e)
{
if (e.HasCopies)//we are copying by using the cntl key
}
else //we are dragging, so need to actually move appts