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

[Solved] OnAppointmentCommand not firing correctly?

2 Answers 172 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 20 Jun 2008, 02:01 PM
I basically have this code:

private void Page_Load(object sender, EventArgs e) 
    if (!IsPostBack) 
    { 
        Session.Remove(AppointmentsKey); 
    } 
    scheduler.DataSource = Appointments
 
private const string AppointmentsKey = 
                   "Telerik.Examples.Scheduler.BindToList_Apts"
private DataSet Appointments 
    get 
    { 
         
        DataSet sessApts = Session[AppointmentsKey] as DataSet; 
        if (sessApts == null) 
        { 
            sessApts = new DataSet(); 
            sessApts.ReadXml(Server.MapPath("appointments.xml")); 
            Session[AppointmentsKey] = sessApts; 
        } 
        return sessApts; 
    } 
 
// For debug: 
protected void scheduler_AppointmentCommand(object sender, AppointmentCommandEventArgs e) 
    Response.Write("Command: " + e.CommandName); 

Now, let's say that here is an appointment on June 20. If, while in monthly view, I double-click in a cell on or before June 20 to insert an appointment, everything works fine. But, if I click on a cell after June 20, when I click "more" all the appointments clear out of the calendar, the new appointment box stays there, and I have to click "more" a second time to get to the more detailed insert box. The first "more" click doesn't cause scheduler_AppointmentCommand to fire, but the second one does.


2 Answers, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 1
answered on 20 Jun 2008, 02:53 PM
Also, when I edit a single occurrence and try to add an exception, I get this:

[NullReferenceException: Object reference not set to an instance of an object.] 
   Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate) +16 
   Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(Appointment originalAppointment, Appointment modifiedAppointment) +244 
   Telerik.Web.UI.RadScheduler.UpdateAppointmentInline(Boolean removeExceptions) +128 
   Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +235 
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115 
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +132 
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177 
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746 
 

0
Simon
Telerik team
answered on 23 Jun 2008, 04:52 PM
Hello Brian,

Could you reproduce this error in any of our online examples for RadScheduler?

If not, could you open a support ticket and send us a simple project which exhibits the error, so that we can debug it?

Sincerely yours,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Brian
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
Simon
Telerik team
Share this question
or