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

Appointment drag and drop

1 Answer 90 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 15 Jan 2013, 10:07 PM
When I drag a new appointment onto the schedule view the default length is always set to 1 hour and and I can not adjust it until the OnEndEdit is fired off. Is there any way to adjust this length during either the AppointmentEditing or AppointmentSaving events?

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 18 Jan 2013, 10:05 AM
Hello Josh,

You could create a custom DragDropScheduleViewBehavior and in it override the following methods:

public override bool CanDrop(Telerik.Windows.Controls.DragDropState state)
{
    foreach(var slot in state.DestinationSlots)        
        slot.End = slot.End.AddMinutes(-30);
    return base.CanDrop(state);
}
  
public override void Drop(Telerik.Windows.Controls.DragDropState state)
{
    foreach(var slot in state.DestinationSlots)        
        slot.End = slot.End.AddMinutes(-30);
    base.Drop(state);
}


Regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Josh
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or