move appointment at the same hour

2 posts, 0 answers
  1. Rang
    Rang avatar
    1 posts
    Member since:
    Sep 2011

    Posted 18 Feb 2014 Link to this post

    Hi,

    I have an appointment at 8:00 (for example) on 18/02/2014 I would like to move it on the same hour by pressing shift for example.
    This mean:
    If shift is pressed then change only the date of the appointment
    else change the date and the time of the appointment

    Regards
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 21 Feb 2014 Link to this post

    Hi Rang,

    You could implement the required logic in the events of theDragDropBehavior of RadScheduleView, for example in CanDrop or Drop methods. For more information about customizing the ScheduleViewDragDropBehavior, please refer to the following help topic:
    http://www.telerik.com/help/silverlight/radscheduleview-features-draganddrop.html

    Also in order to check whether the Shift key is pressed, I would suggest that you use the System.Windows.Input.Keyboard class, here is a quick example:

    public class CustomScheduleViewBehavior : ScheduleViewDragDropBehavior
    {  
       public override void Drop(DragDropState state)
       {
           if (Keyboard.Modifiers == ModifierKeys.Shift)
           {
                //implement any additional logic
           }          
           base.Drop(state);
        }
    }

    I hope this helps.

    Regards,
    Yana
    Telerik
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top