Disable the "drag & drop" of some appointment

6 posts, 0 answers
  1. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 08 Feb 2011 Link to this post

    Hi!

    I've a Scheduler view, which has custom appointments.

    I need to have some of these appointment that aren't drag&dropable, depending of a value of one resource of the appointment.

    My question is:
    On which property of the xaml(in the datatemplate?) can I bind a value which indicate if the current appointment is drag&dropable?
    OR
    Is there a event in which I enter when I try to do the drag&drop? Where I can cancel if I want the change?

    Thank you
  2. George
    Admin
    George avatar
    1332 posts

    Posted 11 Feb 2011 Link to this post

    Hello Julien, 


    In order to implement custom drag and drop behavior, you need to inherit the DefaultDragDropBehavior class. For more information about DragAndDrop in RadScheduleView, please refer to the following links:

    I hope this helps.

    Regards,
    George
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 14 Feb 2011 Link to this post

    Do you have an example of custom behavior? Can we only implement some methods and keep the default behavior for other?
  5. George
    Admin
    George avatar
    1332 posts

    Posted 17 Feb 2011 Link to this post

    Hi Julien,

     
    Please, refer to the following online example - http://demos.telerik.com/wpf/?ScheduleView/FirstLook. You need to implement your custom logic to drag and drop the appointments in the your custom behavior.

    Regards,
    George
    the Telerik team
  6. Michael
    Michael avatar
    105 posts
    Member since:
    Nov 2010

    Posted 06 Jul 2012 Link to this post

    I don't see any implementation of the ScheduleViewDragDropBehaviour in this example??

    In particular I am wanting to implement behaviour that disables an appointment from being moved/dragged beyond a date set in the viewmodel of the IAppointment.

    so i can get the current appointment from state.appointment, but how do i reference what time slots the appointment is being dragged over?
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 06 Jul 2012 Link to this post

    Hi Michael,

    The FirstLook example hast been changed, but you can check Drag and Drop example which demonstrates how custom DragDropBehavior can be implemented for RadScheduleView.

    I would suggest to use CanDrop method in your case - it provides parameter of type DragDropState which contains all the needed information about the destination slots.

    Hope this helps.

    All the best,
    Yana
    the Telerik team

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

Back to Top
UI for WPF is Visual Studio 2017 Ready