Hello,
I'm trying to catch this error. If you put a end datetime in that is before the start datetime my application is falling over. Obviously, I am doing this deliberately to break it, but want to catch the error in case a hapless user tries to do the same for some bizarre reason.
I insert my appointments via a custom Insert template using the Scheduler_AppointmentCommand event. I can catch the input here with:
So, I am not creating an appointment in my business object if the end datetime occurs before the start datetime, but an error is still thrown from the control. Where do I catch this error? Here is the stack trace if that helps:
I'm trying to catch this error. If you put a end datetime in that is before the start datetime my application is falling over. Obviously, I am doing this deliberately to break it, but want to catch the error in case a hapless user tries to do the same for some bizarre reason.
I insert my appointments via a custom Insert template using the Scheduler_AppointmentCommand event. I can catch the input here with:
try |
{ |
if (eventEnd >= eventStart) |
{ |
UserEventHelper.ArrangeAppraisal(doctor, eventStart, location, label, eventEnd, user.ID); |
litStatus.Text = string.Empty; |
} |
else |
{ |
So, I am not creating an appointment in my business object if the end datetime occurs before the start datetime, but an error is still thrown from the control. Where do I catch this error? Here is the stack trace if that helps:
[Exception: Appointment is invalid: Start time must be before the End time.]
Telerik.Web.UI.Appointment.Validate() +162
Telerik.Web.UI.Scheduling.AppointmentController.InsertAppointmentThroughProvider(Appointment appointment) +17
Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +106
Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +326
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565