I have found another issue with the behavior of the UltraWinSchedule controls that I believe needs reviewing by the Infragistics development team (see previous post re. Calendar Drag/Drop Issue). This new issue also relates to the behavior of each of the UltraDayView, UltraWeekView, UltraMonthViewSingle and UltraTimelineView controls.
To allow copying of Appointments I am setting the AllowCopy property of the AppointmentsDraggingEventArgs object in the AppointmentsDragging event handler to True when the drag operation is being conducted with the Ctrl key depressed. The code for this is shown below:
e.AllowCopy = (My.Computer.Keyboard.CtrlKeyDown AndAlso CalendarInfo.SelectedAppointments.Count >= 1)
When I do so in the UltraDayView control two Appointments are shown - the original and a copy. If, while the left mouse button is still depressed, I release the Ctrl key then the copy (which is actually in the original Owner and Timeslot position) disappears. If I depress the Ctrl key again (left mouse button is still depressed) then the copied Appointment reappears. This is a very clean behavior which works in a manner similar to MS Outlook; it allows me to perform either a Copy or a Move quite easily.
Unfortunately this is not the behavior exhibited by the UltraWeekView, UltraMonthViewSingle and UltraTimelineView controls. In the case of the UltraWeekView and UltraMonthViewSingle controls, one Appointment is only ever shown, even though the AllowCopy is set to True. This is particularly confusing because you think you are performing a "Move" when in fact your are performing a "Copy". In the case of the UltraTimelineView control, two Appointments are shown but if you toggle the Ctrl key on and off while the left mouse button is depressed, then the copied Appointment (shown in the original Owner and Timeslot position) does not disappear; thus you are effectively locked in to a copy once the AllowCopy property of the AppointmentsDraggingEventArgs object is set for the first time.
I hope this description makes sense of what is going on during the copy operation as I have implemented it. For your convenience I have included a sample solution which can be used to demonstrate the issue.
Cheers, Tony.
Hello,
Please do not hesitate to contact with us if you have any further questions.
Thank you for using Infragistics Components.
Yes, I can see that your code works fine but alas my similar code does not. The only difference that I can see is the way that you declare and use the AppointmentsDragging event handler.
I will need to look into this further.
Thank you.
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components
Your sample is very similar to our “Appointment Dragging and Resizing” sample from our sample browser, I’ve extracted this sample for you and attached to this thread. So as you can see everything works properly Ctrl + Drag to move/copy appointment. So it seem that you have missed something in your code, and you will be able to compare both samples to find what you have missed.
Please let me know if you have any further questions.