Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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 can be used to initialize a newly created appointment with values other than the default.

View Example

private void schedulerControl1_InitNewAppointment(object sender, DevExpress.XtraScheduler.AppointmentEventArgs e)
{
    e.Appointment.Description += "Created at runtime at " + String.Format("{0:g}", DateTime.Now);
    e.Appointment.CustomFields["Amount"] = 00.01d;
    e.Appointment.CustomFields["ContactInfo"] = "someone@somecompany.com";
}