Dear Customer,
Thanks for using Syncfusion product.
As of now your requirement of setting increment time when resize the appointment in schedule can be achieved by using AppointmentEndResizing event in the schedule control. We have prepare sample for the same and please find the sample in the below link.
Sample link: Schedule_Resize
Note: In the above sample we have used resize event to set the increment time when resize the appointment. In the same way, you can also achieve your requirement for drag and drop the appointment by using AppointmentEndDragging event in the schedule control.
In the above sample we have used below code snippet to set the time when resize the appointment.
private void Schedule_AppointmentEndResizing(object sender, AppointmentEndResizingEventArgs e)
{
if(e.To.Minute<15)
{
(e.Appointment as ScheduleAppointment).EndTime = e.To.AddMinutes(15 - e.To.Minute);
}
else if (e.To.Minute> 15 && e.To.Minute <30)
{
(e.Appointment as ScheduleAppointment).EndTime = e.To.AddMinutes(30 - e.To.Minute);
}
else if(e.To.Minute>30 && e.To.Minute<45)
{
(e.Appointment as ScheduleAppointment).EndTime = e.To.AddMinutes(45-e.To.Minute);
}
else if(e.To.Minute>45)
{
(e.Appointment as ScheduleAppointment).EndTime = e.To.AddMinutes(60 - e.To.Minute);
}
e.Cancel = true;
}
|
In the above code snippet, based on the value of e.To, we have modified the appointment end time and also we have used e.Cancel = true to stop the default actions of AppointmentEndResizing event.
Regards
Vigneshkumar R