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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to prevent CRUD operation on specific appointments?

The Schedule control allows restricting the CRUD operations (Create, Read, Update, and Delete) on specific appointments based on certain conditions. The following steps shows the way to achieve it by setting specific modification rights for each appointments.

Here, the CRUD operations are prevented on appointments that are created by admin.

Step 1: Create an HTML page with the default schedule rendering code. Also, add and refer the required scripts and stylesheets to it by referring here.

Step 2: Define the dragStart, resizeStart, beforeAppointmentCreate, beforeAppointmentRemove and appointmentWindowOpen events of the scheduler as follows,

 

Step 3: Now, define the following event handler functions to check for, whether the appointment is created by admin or not.

 

Sample Location: http://jsplayground.syncfusion.com/s2jpacjv

In the above sample,isAdmin” field has been used to set the modification rights, based on which the CRUD operations are performed on the appointments. For example, if isAdmin field is set to false, only then the appointment operations such as drag and drop, resizing or editing of those appointment will be allowed for the users.

Step 4: Run the sample and perform CRUD operations on the schedule appointments based on isAdmin field value.

Article ID: Published Date: Last Revised Date: Platform: Control:
6494 03/08/2016 03/08/2016 JavaScript ejSchedule
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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