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

Disable Editing on some appointment

1 Answer 198 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andy Ho
Top achievements
Rank 1
Andy Ho asked on 26 Jul 2010, 11:26 AM
Hi,

I wanted to develop a resource booking system, and encountered 3 problems:

1. how can I limit only the originator can edit/delete his own booking? Otherwise, users can change other's booking.

2. how can I set the style to highlight my own bookings?

3. How can I set the time slot (for example, if a room only available for 2 hours during 8 am to 10 am)

Thanks.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 28 Jul 2010, 02:09 PM
Hi Andy,

1. & 2. Handle AppointmentDataBound and conditionally set the appointment's AllowEdit, AllowDelete and BackColor properties:

protected void RadScheduler1_AppointmentDataBound(object sender, Telerik.Web.UI.SchedulerEventArgs e)
   {
       if (conditionBasedOnCurrentUser)
       {
           e.Appointment.AllowDelete = false;
           e.Appointment.AllowEdit = false;
           e.Appointment.BackColor = System.Drawing.Color.Green;
       }
   }

When setting the BackColor property, it is good to also set AppointmentStyleMode="Default" for RadScheduler to keep the rounded corners and gradient.

3.http://www.telerik.com/support/kb/aspnet-ajax/scheduler/setting-special-days-or-time-slots-in-radscheduler.aspx

Let me know if you have further questions.

Best wishes,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Andy Ho
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or