How to: Set Default Values for a New Appointment
This example demonstrates how to use the SchedulerControl.InitNewAppointment event, which occurs in all cases before a new appointment is created. This event is useful, for example, when it is necessary to initialize the newly created appointments with values other than the standard defaults.
The following code changes the all-day option for the newly created appointments to true, sets its label to Important and location - to "New office".
using DevExpress.XtraScheduler;
// ...
private void schedulerControl1_InitNewAppointment(object sender, AppointmentEventArgs e) {
// Make the appointment all-day.
e.Appointment.AllDay = true;
// Set its label to "important".
e.Appointment.LabelId = 1;
// Set its location.
e.Appointment.Location = "New office";
}