How to disable resizing / drag n drop / editing / deleting for specifics appointments and not all ?

Hello,


How to disable resizing for specifics appointments and not all appointments in a scheduler ?


Same question for these actions :

  • drag n drop
  • edit appointment with dialog
  • deleting

Thanks

3 Replies

VM Vengatesh Maniraj Syncfusion Team March 14, 2022 11:41 AM UTC

Please find the details below that help you to accomplish your goal.

https://blazor.syncfusion.com/documentation/scheduler/appointments#readonly



KK Kévin KLEIN March 14, 2022 01:23 PM UTC

Thanks @Vengatesh Maniraj


Is it possible to seperate actions ?

Instead use IsReadonly , use properties like IsDeleting / IsDragable / IsResizing / IsEditing ?



SK Satheesh Kumar Balasubramanian Syncfusion Team March 16, 2022 05:44 PM UTC

Hi Kevin,

You can use OnDragStart, OnResizeStart and OnActionBegin to achieve your requirement.


https://blazor.syncfusion.com/documentation/scheduler/events#ondragstart
https://blazor.syncfusion.com/documentation/scheduler/events#onresizestart

Index.razor: 
    public void OnDragStart(DragEventArgs<AppointmentData> args)
    {
        args.Cancel = true;
    }
    public void OnActionBegin(ActionEventArgs<AppointmentData> args)
    {
        if (args.ActionType == ActionType.EventRemove || args.ActionType == ActionType.EventChange)
        {
            args.Cancel = true;
        }
    }
    public void OnResizeStart(ResizeEventArgs<AppointmentData> args)
    {
        args.Cancel = true;
    }

Kindly try the above sample and let us know if this meets your requirement.

Regards,
Satheesh Kumar B


Loader.
Up arrow icon