ScheduleView DragDrog + Change Appointment's Duration

4 posts, 0 answers
  1. Nucleo
    Nucleo avatar
    13 posts
    Member since:
    Aug 2012

    Posted 14 Nov 2013 Link to this post

    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
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 19 Nov 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Nucleo
    Nucleo avatar
    13 posts
    Member since:
    Aug 2012

    Posted 25 Nov 2013 Link to this post

    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
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 27 Nov 2013 Link to this post

    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 >>
Back to Top