Disable Editing on some appointment

2 posts, 0 answers
  1. Andy Ho
    Andy Ho avatar
    41 posts
    Member since:
    May 2010

    Posted 26 Jul 2010 Link to this post

    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.
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 28 Jul 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top