Hide Delete Icon for Scheduler Appointments

Hello,


It is possible to prevent deleting like explain here :

https://blazor.syncfusion.com/documentation/scheduler/how-to/prevent-appointment-creation-and-deletion


How to mask the delete icon ?


Is it possible to prevent only deleting event for specific appointments and not all ?


1 Reply

RM Ruksar Moosa Sait Syncfusion Team March 16, 2022 05:48 PM UTC

Hi Kevin,


1. The Delete icon can be hidden by overwriting the CSS properties like the below code snippet.


<style>

    .e-quick-popup-wrapper .e-event-popup .e-popup-header .e-header-icon-wrapper .e-delete {

        display: none;

    }

</style>


2. We have prepared a sample to prevent the deletion of specific appointments by using OnActionBegin method like the below code snippet.


public void OnActionBegin(ActionEventArgs<AppointmentData> args)

    {

        if (args.ActionType == ActionType.EventRemove)

        {     

            if (args.DeletedRecords[0].Location == "Paris")

            {

                args.Cancel = true;        

            }               

        }

    }


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


Regards,

Ruksar Moosa Sait


Attachment: Prevent_deletion_of_events_9e7491ee.zip

Loader.
Up arrow icon