In this part we want to consider read-only mode in the context of 3 situations:
1 . Read-only mode for the entire scheduler
2 . Read-only mode for the lightbox
3 . Read-only mode for specific events
To make the entire scheduler read-only, you should set the DHXScheduler.Config.isReadonly option to true.
var sched = new DHXScheduler();
...
sched.Config.isReadonly = true;
Note, when the entire scheduler is non-editable, users can't open the lightbox.
To leave for users the possibility to open the lightbox but forbid any editing inside it, you should set the DHXScheduler.Config.readonly_form option to true:
var sched = new DHXScheduler();
...
sched.Config.readonly_form = true;
To make just specific events read-only, you should:
public class Event
{
public int id { get; set; }
public string text { get; set; }
public DateTime start_date { get; set; }
public DateTime end_date { get; set; }
public bool @readonly {get;set;}
}
DHXScheduler.Extensions.Add(SchedulerExtensions.Extension.Readonly);
Now, each time the user edits some event, the scheduler checks whether this event has the readonly property set to true, and if it does - forbids editing.