ASP.NET Scheduler: How To Implement End-User Restrictions

ASP.NET Team Blog
12 May 2010

Check out this 2 step approach to prevent users from editing appointments in the ASPxScheduler:

Step 1: Choose Restriction

First decide which action in the ASPxScheduler you want to prevent. Here’s a list of the available ones:

Step 2: Check User ID

Then just check the User ID of the logged in user in the ‘Allow’ operation. For example, this code below prevents the user “Sam” from dragging appointments to a new date and time:

schedulerControl1.OptionsCustomization.AllowAppointmentDrag = UsedAppointmentType.Custom;
schedulerControl1.AllowAppointmentDrag += new AppointmentOperationEventHandler

// ...

void schedulerControl1_AllowAppointmentDrag(object sender, AppointmentOperationEventArgs e) {
    if (user_id == "Sam") e.Allow = false;

To learn more, check out this code central example:

Example Details: How to prevent a user from scheduling appointments in the past

FREE DevExpress Xamarin UI Controls

Deliver high-impact native mobile apps with our feature-rich Data Grid, Scheduler, Chart, TabView, Editors, and utility controls. Reserve your free copy today!
No Comments

Please login or register to post comments.