Swap Appointments

4 posts, 1 answers
  1. Nasir
    Nasir avatar
    18 posts
    Member since:
    Apr 2013

    Posted 20 Jun 2013 Link to this post

    Hi,

    I am using RadScheduleView in our project. Our requirement is to Swap appointments i.e. when the user drags and drops an appointment in a slot where another appointment exists, it should swap the two appointments rather than putting both appointments in the same slot. I need this urgently and would really appreciate a prompt response.

    Note: I have already looked into the 
    ConflictCheckingDragDropBehavior
    
     but am not able to get the existing appointment in the destination slot as it is not made public by any method.
    Ideally I would like to get the destination slot and get the existing Appointment object from it and swap its values with the Dragged appointment.

    Regards,

    Nasir.
  2. Answer
    Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 26 Jun 2013 Link to this post

    Hi Nasir,

    The described behavior is quite complicated, because there are several cases which should be considered when implementing the requirement. These include, for example, dragging and dropping multiple appointments as well as dropping over more than one appointment. In the attached sample project it is demonstrated the very basic case in which exactly one appointment is swapped with another, for the other cases additional custom logic should be implemented.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Nasir
    Nasir avatar
    18 posts
    Member since:
    Apr 2013

    Posted 27 Jun 2013 Link to this post

    Hi Kalin,

    Thanks very much, that is exactly what I wanted. The complicated cases you described don't matter. In my case, I am only ever allowing one appointment in a slot. There cannot be more than one appointments in a single slot. However, the ViewModel may rarely put two appointments in the same slot in which case I want to allow the user to drag one of the appointments and move it to an empty slot.

    I am also not allowing the user to drag more than one appointments. The the swap operation is always going to be between two single appointments.

    So what you have sent me is a perfect solution for me. Thanks again.

    Regards

    Nasir
  5. Nasir
    Nasir avatar
    18 posts
    Member since:
    Apr 2013

    Posted 27 Jun 2013 Link to this post

    Thanks, that is exactly what I needed.

    Regards

    Nas
Back to Top