This is a migrated thread and some comments may be shown as answers.

[Solved] User Roles in Rad Scheduler

2 Answers 69 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sant Ra
Top achievements
Rank 1
Sant Ra asked on 03 Dec 2009, 12:00 AM
I am using RadScheduler for the first time.

I am trying to understand if its possible to use the scheduler depending on their privileges.
(Well in my case) Could a user only view the scheduler, an admin update / edit / delete / add an appointment (have all the privileges) ?
What would be the best approach to this?

And also any information or a sample on using different tables to fetch data into the scheduler, would be greatly appreciated. I am trying to pull up data into a scheduler depending on different users. And each type of user will be identified by their location and there are admins in that particular location who could modify the events in the scheduler. There are also general admins who could have access to all the locations. So its three different scenarios.

Thanks for your inputs in advance.

Sant.

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 04 Dec 2009, 03:49 PM
Hello Sant,

You can set RadScheduler's ReadOnly and the Appointment's AllowDelete and AllowEdit properties in Page Load and AppointmentDataBound respectively depending on the current role. Here is an example:
protected void Page_Load(object sender, EventArgs e) 
    
        if (!IsPostBack & Role == "Guest"
        
            RadScheduler1.ReadOnly = true
        
    
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e) 
    
        if (Role == "Member"
        
            e.Appointment.AllowDelete = false
            if (e.Appointment.Attributes["CreatedBy"] != "Member"
                e.Appointment.AllowEdit = false
        }                     
    

The following demo shows how to pull data from a data source conditionally:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/optimizedqueries/defaultcs.aspx



Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Sant Ra
Top achievements
Rank 1
answered on 04 Dec 2009, 04:34 PM
That worked for me. The example and the demo were very informative.

Thanks again !!!
Sant.

"Program like a nerd"
Tags
Scheduler
Asked by
Sant Ra
Top achievements
Rank 1
Answers by
Peter
Telerik team
Sant Ra
Top achievements
Rank 1
Share this question
or