This is a migrated thread and some comments may be shown as answers.

Possible to only allow resizing at one end of appointment?

3 Answers 144 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 20 Jul 2015, 04:09 PM

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

3 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 20 Jul 2015, 04:30 PM

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);
}
0
Steve
Top achievements
Rank 1
answered on 20 Jul 2015, 04:34 PM
Nevermind, I can work with the answer provided here to achieve my aims. Thanks
0
Nasko
Telerik team
answered on 21 Jul 2015, 07:00 AM
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
Tags
ScheduleView
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or