I am using the scheduler control with mostly the default settings. I am databinding my own datasource in code, and have created event handlers for the AppointmentInsert and AppointmentDelete events, which work just fine. My AppointmentUpdate event seems to have a small problem. I'm sure it's something simple, but I can't seem to figure out what.
The problem is that the event fires and I'm able to update the appointment record in my database just fine. But the scheduler control does not retain the updated information. It continues to display the previous information. It's as though it's canceling the update event.
Here is my code:
Can anyone help me determine what I might be doing wrong here that would cause the control to not display the updated appointment information? Thanks in advance.
The problem is that the event fires and I'm able to update the appointment record in my database just fine. But the scheduler control does not retain the updated information. It continues to display the previous information. It's as though it's canceling the update event.
Here is my code:
| protected void rscSchedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) |
| { |
| aspnet_User user = SecurityExtended.UserGet(Page.User.Identity.Name); |
| Telerik.Web.UI.Appointment appointment = e.ModifiedAppointment; |
| Data.Appointment appt = Appointments.AppointmentUpdate((int)appointment.ID, appointment.Subject, appointment.Start, appointment.End, user.UserId, appointment.RecurrenceRule, (int?)appointment.RecurrenceParentID, "", appointment.Description, true); |
| foreach (Resource resource in appointment.Resources) |
| { |
| AppointmentResourceType rt = Appointments.AppointmentResourceTypeGet(resource.Type); |
| int key = (int)resource.Key; |
| string text = (string)resource.Text; |
| if (key > 0) Appointments.AppointmentResourceUpdateSingle(appt.AppointmentID, key); |
| } |
| } |
Can anyone help me determine what I might be doing wrong here that would cause the control to not display the updated appointment information? Thanks in advance.