This is a migrated thread and some comments may be shown as answers.

Is it possible to update an appointment by dropping an item on it

2 Answers 65 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cliff McManus
Top achievements
Rank 1
Cliff McManus asked on 08 Jan 2012, 04:30 PM
I have successfully implemented methods to Drag appointments from a Listbox to the schedule view in order to create new appointments. This is working well.  The Appointment I am using is has a custom field called Room. Is it possible to create a list box containing Room objects and drop them onto an existing appointment to change the existing appointment from one room to another?
Thanks  Cliff

2 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 09 Jan 2012, 04:48 PM
Hello Cliff,

I've created a sample project which demonstrates how you can implement drag and drop between the "Rooms" listbox and the ScheduleView based on the provided description.

Note that you can drag and drop only appointments over the ScheduleView, that's why I've added two classes which inherit Appointment:
 - CustomAppointment class - the real appointments of the ScheduleView. ( more information about custom appointments can be found here.)
 - RoomAppointment  class - the items of the second "Rooms" listbox are converted to this type in order to distinguish them in CanDrop and Drop methods.

Also I used CustomListBoxDragDropBehavior class which overrides DragDropCompleted method in order to prevent the removal of the item from the listbox.

Please download the attachment and give it a try.

Regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cliff McManus
Top achievements
Rank 1
answered on 10 Jan 2012, 04:13 AM
Yana Thanks so much for the quick response. On first glance this is exactly what I need. I see how you did it that is pretty clean.
Cheers Cliff
Tags
ScheduleView
Asked by
Cliff McManus
Top achievements
Rank 1
Answers by
Yana
Telerik team
Cliff McManus
Top achievements
Rank 1
Share this question
or