Skip to main content

ASPxScheduler.InitNewAppointment Event

Occurs before a new appointment is created in the scheduler.

Namespace: DevExpress.Web.ASPxScheduler

Assembly: DevExpress.Web.ASPxScheduler.v24.2.dll

NuGet Package: DevExpress.Web.Scheduler

#Declaration

public event AppointmentEventHandler InitNewAppointment

#Event Data

The InitNewAppointment event's data class is AppointmentEventArgs. The following properties provide information specific to this event:

Property Description
Appointment Gets the appointment for which the event was raised.

#Remarks

Use this event to change the default values of the appointment properties every time it is created in the Scheduler control by the end-user (for instance, when the New Appointment item of the context menu is selected, or an in-place editor is used).

The following code snippet illustrates how to handle the InitNewAppointment event.

<dx:ASPxScheduler id="ASPxScheduler1" runat="server" OnInitNewAppointment="ASPxScheduler1_InitNewAppointment">
    ...
</dx:ASPxScheduler>
protected void ASPxScheduler1_InitNewAppointment(object sender, AppointmentEventArgs e) {
    e.Appointment.AllDay = true;
}
See Also