Is there anyway I can block this event<FormCreated> from postback of User control elements.
Currently I am having issue with it. Please check the image.
1. In the FormCreated event I have
if (e.Container.Mode == SchedulerFormMode.AdvancedInsert)
{
AgendaAppointment insertAppointment = (e.Container.FindControl("ucAppointmentInsert") as AgendaAppointment);
insertAppointment.CurrentUser = SessionManager.LoginUser;
insertAppointment.ActionDate = radSchAppTimeTodo.SelectedDate;
if (radSchAppTimeTodo.SelectedView == SchedulerViewType.DayView)
{
insertAppointment.TimeFrom = ((SchedulerAppointmentContainer)(e.Container)).Appointment.Start.TimeOfDay;
insertAppointment.TimeTo = ((SchedulerAppointmentContainer)(e.Container)).Appointment.End.TimeOfDay;
}
else
{
insertAppointment.TimeFrom = DateTime.Now.TimeOfDay;
insertAppointment.TimeTo = DateTime.Now.TimeOfDay;
}
}
and its working fine for the first them.
2. It sets the TIMEPICKER values of From and To and its difference are calculated and shown in Hours and Minue Integer text field which is correct.
3. But when I increase or decrease the Integer field then postback occurs and those initial values are set again. So If I increase the hours or minute it gets rollback to old values.
So is there anyway to block the form created event on postback.
Currently I am having issue with it. Please check the image.
1. In the FormCreated event I have
if (e.Container.Mode == SchedulerFormMode.AdvancedInsert)
{
AgendaAppointment insertAppointment = (e.Container.FindControl("ucAppointmentInsert") as AgendaAppointment);
insertAppointment.CurrentUser = SessionManager.LoginUser;
insertAppointment.ActionDate = radSchAppTimeTodo.SelectedDate;
if (radSchAppTimeTodo.SelectedView == SchedulerViewType.DayView)
{
insertAppointment.TimeFrom = ((SchedulerAppointmentContainer)(e.Container)).Appointment.Start.TimeOfDay;
insertAppointment.TimeTo = ((SchedulerAppointmentContainer)(e.Container)).Appointment.End.TimeOfDay;
}
else
{
insertAppointment.TimeFrom = DateTime.Now.TimeOfDay;
insertAppointment.TimeTo = DateTime.Now.TimeOfDay;
}
}
and its working fine for the first them.
2. It sets the TIMEPICKER values of From and To and its difference are calculated and shown in Hours and Minue Integer text field which is correct.
3. But when I increase or decrease the Integer field then postback occurs and those initial values are set again. So If I increase the hours or minute it gets rollback to old values.
So is there anyway to block the form created event on postback.