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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

146556 Aug 8,2019 07:11 AM UTC Aug 9,2019 05:37 AM UTC Angular - EJ 2 2
loading
Tags: Schedule
Shabbir Ismail
Asked On August 8, 2019 07:11 AM UTC

  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.

Shabbir Ismail
Replied On 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;
}
}

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 9, 2019 05:37 AM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon