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

SchedulerControl.CreateAppointment(Boolean, Boolean) Method

Invokes the dialog for editing a newly created appointment. Allows you to initialize the editors as the Appointment.AllDay option suggests and show the Appointment Recurrence Form for a recurring appointment.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.1.dll

Declaration

public void CreateAppointment(
    bool allDay,
    bool recurring
)
Public Sub CreateAppointment(
    allDay As Boolean,
    recurring As Boolean
)

Parameters

Name Type Description
allDay Boolean

true, if the appointment being created will be Appointment.AllDay; otherwise, false.

recurring Boolean

true, if the appointment being created will be recurring; otherwise, false.

Remarks

The Edit Appointment dialog is displayed with the following appointment settings:

Property Value
Appointment.AllDay The value of the allday method parameter.
Appointment.Start The start of the time interval currently selected in the active view of the Scheduler. This time interval can be obtained using the SchedulerViewBase.SelectedInterval property of the SchedulerControl.ActiveView.
Appointment.End The end of the time interval currently selected in the active view of the Scheduler. This time interval can be obtained using the SchedulerViewBase.SelectedInterval property of the SchedulerControl.ActiveView.
Appointment.ResourceId The identifier of the currently selected resource (a resource returned by the SchedulerViewBase.SelectedResource property of the SchedulerControl.ActiveView).
Appointment.StatusId AppointmentStatusType.Free

The CreateAppointment method can be used in place of the method listed in the table below. Columns allday and recurring show the CreateAppointment method parameters required to invoke the Edit Appointment dialog in exactly the same way as the method in the first column does.

Method allday recurring
SchedulerControl.CreateNewAppointment false false
SchedulerControl.CreateNewRecurringAppointment false true
SchedulerControl.CreateNewAllDayEvent true false
SchedulerControl.CreateNewRecurringEvent true true

 

TIP

To create a new appointment in code, use the SchedulerStorageBase.CreateAppointment method.

NOTE

Use the SchedulerOptionsCustomization.AllowAppointmentCreate option to restrict appointment creation. A new appointment cannot be created if this option is set to UsedAppointmentType.None.

See Also