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

3 posts, 1 answers
  1. Cliff McManus
    Cliff McManus avatar
    32 posts
    Member since:
    Mar 2011

    Posted 08 Jan 2012 Link to this post

    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. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 09 Jan 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Cliff McManus
    Cliff McManus avatar
    32 posts
    Member since:
    Mar 2011

    Posted 09 Jan 2012 Link to this post

    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
Back to Top