Hello. I need help with three things:
Using the above functions, I can prevent insertion/editing-in a prior date, but how do I get the scheduler to output an error message?
And how do I require resource selection from dropdown menus AND provide errors for those as well?
Thanks in advance.
- I need to make it required that a user selects from two resource dropdowns before attempting to submit a new appointment.
- I need to make it required that the date of the appointment is after today.
- I need to output error messages if either of these two do not happen.
| protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e) |
| { |
| //if the event takes place before today, cancel, preferably with an error message |
| //if the resources are left empty, cancel, preferably with an error message |
| if (e.Appointment.Start <= DateTime.Now) |
| { |
| e.Cancel = true; |
| } |
| } |
| protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) |
| { |
| //if the event takes place before today, cancel, preferably with an error message |
| //if the resources are left empty, cancel, preferably with an error message |
| if (e.ModifiedAppointment.Start <= DateTime.Now) |
| { |
| e.Cancel = true; |
| } |
| } |
Using the above functions, I can prevent insertion/editing-in a prior date, but how do I get the scheduler to output an error message?
And how do I require resource selection from dropdown menus AND provide errors for those as well?
Thanks in advance.