Hi,
I need to update another datasource when the user updates an appointment. Specifically if the date of appoitnment is moved then the other datasource needs to update another table with that date.
The error states that the "page.Valid cannot be called before validation has taken place.", this occurs after I have dragged the appointment. I have illustrated further down on the code where the error occurs.
i have read some forum topics on this and it appears (correct me if I am wrong) the detailsview update, cannot fire until the scheduler has completed its update. If this is the case how can I get the detailsform to update via code after the scheduler has finished. I tried putting it in the schedulers databound event but still had teh same problem.
Here is my code to give you an idea of where the error is occuring
Thanks in Advance
JK
I need to update another datasource when the user updates an appointment. Specifically if the date of appoitnment is moved then the other datasource needs to update another table with that date.
The error states that the "page.Valid cannot be called before validation has taken place.", this occurs after I have dragged the appointment. I have illustrated further down on the code where the error occurs.
i have read some forum topics on this and it appears (correct me if I am wrong) the detailsview update, cannot fire until the scheduler has completed its update. If this is the case how can I get the detailsform to update via code after the scheduler has finished. I tried putting it in the schedulers databound event but still had teh same problem.
Here is my code to give you an idea of where the error is occuring
| protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) |
| { |
| txAppointmentID.Text = e.Appointment.ID.ToString(); //this control is used as a criteria for a datasource |
| dvServiceHistory.DataBind(); // update results based on criteria from above |
| dvServiceHistory.ChangeMode(DetailsViewMode.Edit); //change the form to accept edit data |
| TextBox TheDate = (TextBox)dvServiceHistory.FindControl("txEditSHDate"); //find the control ready for change |
| string ModifiedDate = e.ModifiedAppointment.Start.ToString(); //obtain new date from appointment |
| TheDate.Text = ModifiedDate.Substring(0, 10).ToString(); //convert to string and strip time from the new appointment date |
| dvServiceHistory.UpdateItem(true); // update record, THIS IS THE LINE WHICH CAUSES THE PAGE.VALID ISSUE, WHERE CAN I PUT THIS LINE? |
| } |
Thanks in Advance
JK