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

Prevent multiple appointments from being resized

3 Answers 127 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Håkan
Top achievements
Rank 1
Håkan asked on 02 Feb 2012, 02:23 PM
Hi,

I want to prevent the user from selecting multiple appointments and drag or resize them, only one at a time is allowed.
I have created a custom DragDropBehavior and overloaded the CanStartDrag and CanStartResize methods.
In CanStartDrag I do this check:

if (state.DraggedAppointments.Count() > 1)
  return false;

But if I do the same check in CanStartResize, the count is 0.
It seems that resized appointments are not in the DraggedAppointments collection.
Is there any other way I can check this?

Regards,
HÃ¥kan

3 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 07 Feb 2012, 04:25 PM
Hello Hakan,

RadScheduleView will resize ony the appointment that is being resized, even if you select multiple appointments. Unfortunately we do not provide API to change this behavior even though it is good. The resized appointment instance can be accessed through the DragDropState.Appointment property, but the rest of the selected appointments cannot be accessed for a resize operation.

I created a sample application that demonstrates two different approaches:
1) Completely disable the multiple selection in the ScheduleView - check the CustomAppointmentSelectionBehavior class. If you apply this, the user will not be able to select multiple appointments.
2) Drag only a single appointment, while unselecting the rest - check the CustomDragDropBehavior. If you apply this the user will be able to select multiple appointments, but if it starts a drag-drop operation, only the appointment that is under the mouse will remain selected and dragged. The resize operation will be as it is now.

Kind regards,
Valeri Hristov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Myles
Top achievements
Rank 1
answered on 15 Mar 2012, 02:25 PM
"RadScheduleView will resize ony the appointment that is being resized, even if you select multiple appointments" - Are there any plans to introduce this functionality in the future?  The lack of this functionality is preventing me from purchasing this product.
0
Konstantina
Telerik team
answered on 20 Mar 2012, 10:17 AM
Hi Myles,

I have added this feature request in PITS. You can view it here. You can vote for it and track its status to see when it is going to be implemented. Once we start working on it, the status will be updated. The more vote it receives, the earlier will be implemented.

Regards,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
ScheduleView
Asked by
Håkan
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Myles
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or