Disable edit/drag only for specific event

Another issue: is possible to disable edit/drag only for specific event?
In other word, i need to disable editing/dragging on event based on parameter.

Example:
event1 - status_no=0 --> enable edit/drag
event1 - status_no=1 --> disable edit/drag

Thankyou for your help

Hello,

Please check onBeforeDrag event page in our documentation.

scheduler.attachEvent("onBeforeDrag", function (event_id, mode, native_event_object){ var ev = scheduler.getEvent(event_id); if(ev.status_no) return false; // blocked drag if status_no = 1 return true; // dnd is enabled for other events });
Best regards,
Ilya

Hi. This is an old post but i couldn’t figure out how to solve this.

I have a parameter on the scheduler’s ‘events’ table. Based on it, i’d like to enable/disable events edition.

How can I do that?

Thanks in advance.

above code will help with dnd blocking , you can place similar handlers for onBeforeLightbox and onClick, onDblClick events - returning false from them will prevent all ways to edit event.

Also, there is a readonly extension for the scheduler
docs.dhtmlx.com/doku.php?id=dhtm … donly_view