Appointment drag and drop

2 posts, 1 answers
  1. Josh
    Josh avatar
    17 posts
    Member since:
    Aug 2012

    Posted 15 Jan 2013 Link to this post

    When I drag a new appointment onto the schedule view the default length is always set to 1 hour and and I can not adjust it until the OnEndEdit is fired off. Is there any way to adjust this length during either the AppointmentEditing or AppointmentSaving events?
  2. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 18 Jan 2013 Link to this post

    Hello Josh,

    You could create a custom DragDropScheduleViewBehavior and in it override the following methods:

    public override bool CanDrop(Telerik.Windows.Controls.DragDropState state)
    {
        foreach(var slot in state.DestinationSlots)        
            slot.End = slot.End.AddMinutes(-30);
        return base.CanDrop(state);
    }
      
    public override void Drop(Telerik.Windows.Controls.DragDropState state)
    {
        foreach(var slot in state.DestinationSlots)        
            slot.End = slot.End.AddMinutes(-30);
        base.Drop(state);
    }


    Regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top