Resize appointment via Javascript

3 posts, 0 answers
  1. Augeneer
    Augeneer avatar
    4 posts
    Member since:
    Jan 2011

    Posted 22 Feb 2011 Link to this post

    Hi,

    I have a requirement whereby I need to be able to resize an appointment as it is being dragged by the user [multiple appointments are not allowed in the same slot]. Not allowing an appointment in an already used slot has been done, but I am having trouble with the second part of this requirement. As I see it, to do this I will have to be able to:
     - look at a the time-slots that are at each side of the current target_slot
     - check to see if there are any appointments in either of these slots
     - If there are, resize the current appointment.

    The trouble i have at the moment is that I am not sure how to get the adjacent slots.
    How do I go about doing this?

    regards
    Augeneer
  2. Augeneer
    Augeneer avatar
    4 posts
    Member since:
    Jan 2011

    Posted 23 Feb 2011 Link to this post

    OK,

    I think I was looking at this wrong way.
    I think the best approach here would be to work with the OnClientAppointmentMoveEnd event.
    Once the move is complete, the asses where the appointment has been placed and check for any empty slots around.
    Then move the appointment and resize if necessary...

    The problem then comes when doing the move.

    Because we are using the OnClientAppointmentMoveEnd  when the start date is updated through the analysis of the slots around the appointment, the update is lost. This is because OnClientAppointmentMoveEnd has not applied the update of the move as yet.

    How do we get around this? 
    If we cancel then we will get a double movement of the appointment going back to the original position and then move to the empty slot we have found for it....

    Any help is appreciated,

    Regards
    Augeneer
  3. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 01 Mar 2011 Link to this post

    Hello Augeneer,

    I'm not sure if I got your requirement.
    Could you please send me a sample project and try to explain once again what do you want to achieve?

    Thank you!

    All the best,
    Veronica Milcheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top