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

Swap Appointments

3 Answers 80 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Nasir
Top achievements
Rank 1
Nasir asked on 20 Jun 2013, 02:45 PM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 26 Jun 2013, 02:49 PM
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 >>
0
Nasir
Top achievements
Rank 1
answered on 27 Jun 2013, 08:53 AM
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
0
Nasir
Top achievements
Rank 1
answered on 27 Jun 2013, 08:54 AM
Thanks, that is exactly what I needed.

Regards

Nas
Tags
ScheduleView
Asked by
Nasir
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Nasir
Top achievements
Rank 1
Share this question
or