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

ScheduleView DragDrog + Change Appointment's Duration

3 Answers 41 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Nucleo
Top achievements
Rank 1
Nucleo asked on 14 Nov 2013, 06:50 PM
Hello,

Is it possible to change the duration of an appointment while dragging it? When i find a read-only slot, i need to add the duration of the slot to my appointment's duration, and show this to my user.

Thanks in advance,

Marcelo

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 19 Nov 2013, 12:04 PM
Hi,

To change the dragged appointments I suggest you implement a custom SnapBehavior class that you can use to manage the start and end time of the dragged appointment.
For more details you can read in the link below:
http://www.telerik.com/help/wpf/radscheduleview-features-snapappointments.html

Also you can implement a custom DragDropBehavior and manipulate the dragged apointments according the slots in its methods. For more details please refer to  our help article


Hope this helps.

Regards,
Rosi
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
Nucleo
Top achievements
Rank 1
answered on 25 Nov 2013, 02:23 PM
Hi, thanks for your answer.

For what I've tested and researched, the SnapBehavior allow me to set the start of my appointment. I have this scenario:

I have some read-only slots. The user can place an appointment (with a duration of 60 minutes) 10 minutes before one of these slots. This way, the duration of the read-only slots it's going to be added to the duration of my appointment. I was able to do that on my server side, and when I reload my appointments it's shown perfectly.

What I want to do is that, while dragging the appointment, before the user releases it, I want to be able to show him that the appointment's duration will change, considering the slot's duration.

Is that any way to, while the dragging is being done, I have access to my appointment's properties?

Thanks in advance,

Marcelo
0
Kalin
Telerik team
answered on 27 Nov 2013, 02:44 PM
Hi Marcelo,

You can change the Appointment's duration while dragging inside of the CanDrop method in the custom DragDropBehavior. The method is called multiple time during the dragging and can check inside if the Appointment has reached a Slot. However the desired scenario can be only achieved by using a regular SpecialSlots not a ReadOnly ones as when a dragged Appointment goes above a ReadOnly Slot dropping is disabled and the visual dropping target disappears. I'm attaching a sample project which demonstrates how the Appointment can be resized when dragged above a SpecialSlot.

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 >>
Tags
ScheduleView
Asked by
Nucleo
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Nucleo
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or