DayPilot Forums

AJAX Calendar/Scheduling Controls
DayPilot » Forums » How To » How to lock certain events from being edited or removed

How to lock certain events from being edited or removed

Hi all,

I have just purchased this really cool control and am really happy with it however i Have this question...

due to the way that I wish to implement the calendar I would like different memebers of staff to be able to add events however I would like on those events added by a staff member to be editied or removed by that staff memebr only all ather staff should see a read only version of the entry.

Is this possible?

Thanks in advance.

Regards,

Ozzie

Ozzie (ICTNUT) - 2/15/2010 9:45:44 PM

I've just added a KB article with a short guide:

How to make the Calendar events read-only

Dan Letecky - 2/18/2010 9:23:44 AM

Thanks for the KB Article however I solved this problem in the folowing way:

In our case the userID is held in a local cookie so we go ahead and extract it into a private variable called uID then in the DayPilotCalendar1_BeforeEventRender section we have the following:

If e.Tag("tasksstaffid") <> uID Then

e.EventClickEnabled = False

e.EventMoveEnabled = False

e.EventResizeEnabled = False

e.EventDeleteEnabled = False

e.EventRightClickEnabled = False

e.BackgroundColor = "#999999"

e.InnerHTML = e.InnerHTML

End If
Ozzie (ICTNUT) - 2/19/2010 2:45:11 PM
Post reply