Adjust APPOINTMENT while it is moving

6 posts, 0 answers
  1. Stepan
    Stepan avatar
    29 posts
    Member since:
    Mar 2011

    Posted 13 Sep 2011 Link to this post

    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.

  2. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 14 Sep 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stepan
    Stepan avatar
    29 posts
    Member since:
    Mar 2011

    Posted 14 Sep 2011 Link to this post

    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
  5. Dan Lehmann
    Dan Lehmann avatar
    103 posts
    Member since:
    May 2011

    Posted 14 Sep 2011 Link to this post

    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
  6. Stepan
    Stepan avatar
    29 posts
    Member since:
    Mar 2011

    Posted 15 Sep 2011 Link to this post

    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.
  7. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 16 Sep 2011 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017