Hi,
I'm trying to prevent particular users from being able to delete appointments but not having much luck so far.
Following the various threads on the same topic I've added the logic into the AppointmentDataBound event.
In stepping through the code the if statement happily evaluates to true and then sets the e.Appointment.AllowDelete to false. However the context menu delete still causes the Confirm Delete Dialog to display and will still delete the appointment. I've added in the AppointmentDelete event and checked the AllowDelete for the appointment and it evaluates to false despite deleting the appointment.
Is there a more comprehensive example of this or anything I can look at that might be effecting it?
Cheers,
Damien
I'm trying to prevent particular users from being able to delete appointments but not having much luck so far.
Following the various threads on the same topic I've added the logic into the AppointmentDataBound event.
Protected Sub rd_Schedule_AppointmentDataBound(ByVal sender As Object, ByVal e As SchedulerEventArgs) |
'Control Access to Edit and Delete Appointments |
If Page.User.IsInRole("BasicAccess") then |
e.Appointment.AllowDelete = False |
End If |
End Sub |
In stepping through the code the if statement happily evaluates to true and then sets the e.Appointment.AllowDelete to false. However the context menu delete still causes the Confirm Delete Dialog to display and will still delete the appointment. I've added in the AppointmentDelete event and checked the AllowDelete for the appointment and it evaluates to false despite deleting the appointment.
Is there a more comprehensive example of this or anything I can look at that might be effecting it?
Cheers,
Damien