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

Prevent moving between groups

1 Answer 5 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Su Sundee
Top achievements
Rank 1
Su Sundee asked on 30 Aug 2013, 09:08 AM
Hello!

How to prevent the appointment by moving between groups in RadScheduler?
Can you help me?

Thank you for the respond.

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 04 Sep 2013, 10:21 AM
Hello,

I guess that you want to prevent appointments from moving between different resource when resource grouping is enabled. In such case I would like to give you a solution that will check whether the time slot where you want to drop the appointment have different resource value and if so it will cancel the moving action.
//markup code
<telerik:RadScheduler runat="server" ID="RadScheduler1" GroupBy="User" GroupingDirection="Vertical" OnClientAppointmentMoveEnd="ClientAppointmentMoveEnd">
       ....
    </telerik:RadScheduler>

//JavaScript
function ClientAppointmentMoveEnd(sender, args) {
     var targetSlot = args.get_targetSlot();
     var targetSlotResource = targetSlot.get_resource().get_text();
     var currentTimeSlot = args.get_appointment().get_timeSlot();
     var currentTimeSlotResource = currentTimeSlot.get_resource().get_text();
 
     if (targetSlotResource != currentTimeSlotResource) {
         args.set_cancel(true);
     }
 }



Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Su Sundee
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or