A newer version of this page is available. Switch to the current version.

ASPxScheduler.InitNewAppointment Event

Occurs before a new appointment is created in the scheduler.

Namespace: DevExpress.Web.ASPxScheduler

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

Declaration

public event AppointmentEventHandler InitNewAppointment
Public Event InitNewAppointment As AppointmentEventHandler

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. Refer to the Custom appointment form with modified behavior to get complete code.

<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