We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

External Drag & Drop to Calendar

I am in need of a method to drag a customer from a listview to the calendar and have an appointment appear.

I've tried creating a new instance of ScheduleAppointment during a drag from the listview.

ScheduleAppointment sa = new ScheduleAppointment();
sa.Subject = "Call";
DataObject dragData = new DataObject(sa);
DragDrop.DoDragDrop(_draggedItem, dragData, DragDropEffects.Copy);

It appears the schedule control does not accept this in a drop. I've tried writing my own drop handler to the schedule control, but I have not found a way to inquiry what date/time the drop has occured over (say for example, provide x,y coordinates and recieve a datetime value back)

While our department is in the middle of approving a license purchase including source code; I'd rather find a way to impliment this without modifying the control source code.

Any thoughts?

Thanks,
Dan

5 Replies

AR Abdul Rahman A.H Syncfusion Team August 2, 2010 11:45 AM UTC

Hi Dan,

Thanks for choosing Syncfusion products.

Please let me know whether you have initialized the AllowDrop property of schedule control as true.

AllowDrop property permits the user to drop/ relocate the appointment in the appointments layout.


Regards,
Abdul Rahman.


DG Dan Guisinger August 2, 2010 03:30 PM UTC

Abdul,

The AllowDrop property is initialized.
Appointments can be dragged and dropped within the calendar control; I'm trying to figure out how to create a drag event outside the calendar and drop an appointment onto it.

Dan


AR Abdul Rahman A.H Syncfusion Team August 4, 2010 01:13 PM UTC

Hi Dan,

Schedule does not have such feature to add items on dropping it from list view.

However you can achieve this by using some work around.

Listen to Schedule’s MouseLeftButtonDown Event.

2) Create a new ScheduleAppointment by retrieving data of item being dragged from your custom drag and drop manager.

3) Add this to Schedule’s Appointments collection.

Please make sure that you have given start and end time of the appointment as it is mandatory. Otherwise the appointment will be added in first/ default date of your culture.
Thanks,
Abdul Rahman


DG Dan Guisinger August 4, 2010 05:28 PM UTC

Abdul,

We need to find a way to drag and drop to whatever time slot the mouse is released over; I can't find a way to ask the schedule control for the time/date under a particular mouse coordinate.

Can we have external drag & drop added by Syncfusion? It appears the WinForms version does have external drag & drop event handlers.

This is a required feature of our application; we just purchased a 3-pack of licenses of Essential Studio Enterprise.

Dan


AR Abdul Rahman A.H Syncfusion Team August 6, 2010 10:47 AM UTC

Hi Dan,

You have opened a Direct Trac incident (Incident ID 70784) for the same issue.

We have updated you with patch and sample to achieve your requirements.

Please follow up that incident in Direct Trac.

Thanks,
Abdul Rahman

Loader.
Live Chat Icon For mobile
Up arrow icon