We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to disable edit button in scheduler and keep delete button enable

  I have applied IsReadonly = true in data source but this disables delete button too. I have gone through the documentation but unable to find the specif query.

2 Replies

SI Shabbir Ismail August 8, 2019 07:35 AM UTC

I got the answer below is for reference:


<ejs-schedule [currentView]="setView" [eventSettings]="eventObject" #scheduleObj (actionBegin)="onActionBegin($event)"
(popupOpen)="onPopupOpen($event)"></ejs-schedule>


onPopupOpen(args: PopupOpenEventArgs): void {
var buttonElement = args.type === "QuickInfo" ? ".e-event-popup .e-edit" : ".e-schedule-dialog .e-event-edit";
var editButton = document.querySelector(buttonElement);
if (editButton && (editButton as EJ2Instance).ej2_instances) {
((editButton as EJ2Instance).ej2_instances[0] as Button).disabled = true;
}
}


KK Karthigeyan Krishnamurthi Syncfusion Team August 9, 2019 05:37 AM UTC

Hi Shabbir, 
 
Syncfusion greetings. 
 
We're glad you've discovered the answer 😊. 
 
Regards, 
Karthi 


Loader.
Live Chat Icon For mobile
Up arrow icon