Skip to main content
All docs
V25.1
  • DxScheduler.AllowDragAppointment Property

    Specifies whether users can drag appointments.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(true)]
    [Parameter]
    public bool AllowDragAppointment { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true to allow users to drag appointments; otherwise, false.

    Remarks

    The Scheduler allows users to move and resize appointments to change their start and end dates.

    You can set the AllowDragAppointment and AllowResizeAppointment properties to false to prevent users from dragging and resizing appointments.

    @using Data
    
    <DxScheduler StartDate="@DateTime.Today"
                 DataStorage="@DataStorage"
                 AllowDragAppointment="false"
                 AllowDragAppointmentBetweenResources="false"
                 AllowResizeAppointment="false">
        <DxSchedulerWeekView/>
    </DxScheduler>
    
    @code {
        DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
            AppointmentsSource = AppointmentCollection.GetAppointments(),
            AppointmentMappings = new DxSchedulerAppointmentMappings() {
                Type = "AppointmentType",
                Start = "StartDate",
                End = "EndDate",
                Subject = "Caption",
                AllDay = "AllDay",
                Location = "Location",
                Description = "Description",
                LabelId = "Label",
                StatusId = "Status",
                RecurrenceInfo = "Recurrence"
            }
        };
    }
    

    Run Demo: Scheduler - User Action Restriction

    See Also