I use this code to delete:
protected void RadScheduler1_AppointmentDelete(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
{
SchedulerTask task = SchedulerTask.GetByID(Convert.ToInt32(e.Appointment.ID));
task.Delete();
}
And I get next error message:
Server Error in '/src' Application.
Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.
Source Error:
Stack Trace:
protected void RadScheduler1_AppointmentDelete(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
{
SchedulerTask task = SchedulerTask.GetByID(Convert.ToInt32(e.Appointment.ID));
task.Delete();
}
And I get next error message:
Server Error in '/src' Application.
No parameterless constructor defined for this object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
|
Stack Trace:
[MissingMethodException: No parameterless constructor defined for this object.] Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.OnDataSourceOperationComplete(Int32 count, Exception e) +39 System.Web.UI.DataSourceView.Delete(IDictionary keys, IDictionary oldValues, DataSourceViewOperationCallback callback) +83 Telerik.Web.UI.Scheduling.DataSourceViewSchedulerProvider.Delete(RadScheduler owner, Appointment appointmentToDelete) +262 Telerik.Web.UI.Scheduling.AppointmentController.DeleteAppointmentThroughProvider(Appointment appointmentToDelete) +170 Telerik.Web.UI.Scheduling.AppointmentController.DeleteAppointment(Appointment appointmentToDelete, Boolean deleteSeries) +1833 Telerik.Web.UI.RadScheduler.DeleteAppointment(Appointment appointmentToDelete) +109 Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +2427 Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +108 Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +42 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563 |