Back to Devexpress

DxScheduler.CreateAppointmentAsync(DateTime, DateTime, Boolean, Object) Method

blazor-devexpress-dot-blazor-dot-dxscheduler-dot-createappointmentasync-x28-system-dot-datetime-system-dot-datetime-system-dot-boolean-system-dot-object-x29.md

latest3.1 KB
Original Source

DxScheduler.CreateAppointmentAsync(DateTime, DateTime, Boolean, Object) Method

Creates a new appointment for the Scheduler, but does not save it to a data source.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public Task<DxSchedulerAppointmentItem> CreateAppointmentAsync(
    DateTime start,
    DateTime end,
    bool allDay,
    object resourceId
)

Parameters

NameTypeDescription
startDateTime

Specifies the appointment’s start date.

| | end | DateTime |

Specifies the appointment’s end date.

| | allDay | Boolean |

Specifies whether the appointment is scheduled for the entire day or several days.

| | resourceId | Object |

Specifies the identifier of the resource object associated with the appointment.

|

Returns

TypeDescription
Task<DxSchedulerAppointmentItem>

An asynchronous operation that returns the created appointment. Returns null if the appointment can not be created.

|

Remarks

You can use the CreateAppointmentAsync method to create a new appointment for the Scheduler. Then you can pass the created appointment to the ShowAppointmentEditFormAsync(Boolean, DxSchedulerAppointmentItem) method to show the created appointment in the edit form. To save the appointment to a data source, a user can click the Save button or you can use the SaveAppointmentAsync(DxSchedulerAppointmentItem) method.

Note that the method returns null in the following cases:

Implements

CreateAppointmentAsync(DateTime, DateTime, Boolean, Object)

See Also

DxScheduler Class

DxScheduler Members

DevExpress.Blazor Namespace