Possible to only allow resizing at one end of appointment?

4 posts, 0 answers
  1. Steve
    Steve avatar
    20 posts
    Member since:
    Jan 2011

    Posted 20 Jul 2015 Link to this post

    Hello,

    With the RadScheduleView, is it possible to make it so that the user can resize only by dragging the end time of an appointment, but not the start time?

    I attempted to implement this by overriding CanStartResize in a custom ScheduleViewDragDropBehavior, but couldn't find any way to determine if it is the start or end time that is being dragged.

    Any assistance would be greatly appreciated

    Thanks

  2. Steve
    Steve avatar
    20 posts
    Member since:
    Jan 2011

    Posted 20 Jul 2015 in reply to Steve Link to this post

    Just to expand on this a little, I can achieve the functionality by overriding CanResize, as below, but ideally I would like to use CanStartResize instead, in order to avoid the visual suggestion to the user that resizing should be possible.

     Cheers

      

    public override bool CanResize(DragDropState state)
    {
        var destinationSlot = state.DestinationSlots.First() as Slot;
        var appointment = state.Appointment as Appointment;
     
        if (destinationSlot.End != appointment.End)
        {
            return false;
        }
     
        return base.CanResize(state);
    }
  3. UI for WPF is Visual Studio 2017 Ready
  4. Steve
    Steve avatar
    20 posts
    Member since:
    Jan 2011

    Posted 20 Jul 2015 in reply to Steve Link to this post

    Nevermind, I can work with the answer provided here to achieve my aims. Thanks
  5. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 21 Jul 2015 Link to this post

    Hi Steve,

    We are really glad that you were able to achieve the desired and found an approach that suits your requirements.

    If you have any additional questions or concerns regarding Telerik controls please, do not hesitate to contact us.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top