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

Adjust APPOINTMENT while it is moving

5 Answers 61 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Stepan
Top achievements
Rank 1
Stepan asked on 13 Sep 2011, 03:02 PM
Dear Telerik!

I found a very useful client-side event "OnClientAppointmentMoving".

I can access the initial appointment's place before dragging stated, and I can see over which timeslot the opaque rectangle (current appointment's location) currently hangs, and I can cancel the motion and send the appointment back where it was.

But my question is: Can I control that moving opaque rectangle from inside this eveny handler?

Why I need that...

Users of my web site must have limited rights for moving appointments. In particular, they must be unable to move the appointments into the past. Nevertheless when they try dragging an appointment into the past it must not just jump back to the place where it had been before the dragging started (what "args.set_cancel(true)" would do). Instead it must move according to my custom logic...

But is it at all possible?

Many thanks!

- Stepan.

5 Answers, 1 is accepted

Sort by
0
Dan Lehmann
Top achievements
Rank 1
answered on 14 Sep 2011, 05:42 PM
Please see: http://www.telerik.com/help/aspnet-ajax/scheduler-onclientappointmentmoveend.html

Pretty sure you can get the old time with get_appointment() and the new time with get_newStartTime(). The event you were handling wouldn't have the newStartTime.

Hope that helps,
Dan
0
Stepan
Top achievements
Rank 1
answered on 14 Sep 2011, 07:17 PM
Dear Dan,

Yes, you are right, we can GET all data like you suggest, but the idea is to SET them... Don't you think it is possible?

- Stepan
0
Dan Lehmann
Top achievements
Rank 1
answered on 14 Sep 2011, 07:26 PM
Don't you just need to be able to cancel the move under certain conditions? If so, set_cancel(true) in the handler for OnClientAppointmentMoveEnd.

Dan
0
Stepan
Top achievements
Rank 1
answered on 15 Sep 2011, 08:30 AM
I do know this option, but, unfortunately, it's not what I need...  I need the opaque rectangle, when trying to enter the forbidden zone, to move abound the zone's border, but not just jumb back to its initial place...

- Stepan.
0
Plamen
Telerik team
answered on 16 Sep 2011, 07:50 AM
Hello Stepan,

Please find attached a sample project that shows one possible way how the onClientAppointmentMoving event can be used.

Hope it will be helpful.

Kind regards,
Plamen Zdravkov
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
Tags
Scheduler
Asked by
Stepan
Top achievements
Rank 1
Answers by
Dan Lehmann
Top achievements
Rank 1
Stepan
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or