Security trim for RAD Schedule

2 posts, 0 answers
  1. CH
    CH avatar
    48 posts
    Member since:
    Aug 2010

    Posted 13 Oct 2011 Link to this post

    is there anyway or documentation to shows me how to set security trim on RADSchedule.
    I have a requirement where only admin can update,delete and create new appointment,
    Contract Staff can only view
    Permanent staff can view, create and delete their own appointment.

    can someone point me to any website/document so i can learn how to do this.


  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 14 Oct 2011 Link to this post

    Hi there,

    We do something very similar to this. I assume that, server-side, you have a way of knowing the access level of the user.

    What you need to do, in the Appointment_DataBound event of the Scheduler, is set the AllowDelete and AllowEdit properties appropriately, like this ...
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
      e.Appointment.AllowEdit = e.Appointment.AllowDelete = UserHasEditAccessLevel;

    When it comes to adding a new appointment, it depends on how you normally allow a user to do it. The normal method is for the user to double-click on an empty time slot. You can catch this and stop it if necessary by wiring up the OnFormCreating event ...
    protected void RadScheduler1_FormCreating(object sender, SchedulerFormCreatingEventArgs e)
      e.Cancel = !UserHasAddAccessLevel;

    You can find more information about RadScheduler's events starting at this documentation page. Similarly, you'll find a number of helpful ideas if you look at the code associated with the various RadScheduler demos.

    Hope this helps get you started.


Back to Top