Blogs

News

Email Subscriptions

Mehul Harry's DevExpress Blog

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

     

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
(schedulerControl1_AllowAppointmentDrag);

// ...

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

Published May 12 2010, 03:06 PM by Mehul Harry (DevExpress)
Technorati tags: Features, How-To, ASP.NET, ASPxScheduler
Bookmark and Share

Comments

No Comments

About Mehul Harry (DevExpress)

Mehul Harry is an ASP.NET technical evangelist at Developer Express. You can reach him directly at mharry@DevExpress.com. You can also follow him on Twitter: http://twitter.com/mehulharry
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.