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

How do i change the color of the scheduler?

1 Answer 67 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Wielyanto
Top achievements
Rank 1
Wielyanto asked on 26 Sep 2008, 03:14 AM
Hi all,

I want to customize my scheduler, so that the empty time slot will be colored as well.

Currently I can only color the time slot that has been booked for an appointment.

through this code

Protected Sub RadScheduler1_AppointmentCreated(ByVal sender As Object, ByVal e   As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles   EquipmentScheduler.AppointmentCreated
    If e.Appointment.Attributes("ForceSaving") = "0"  Then 
        e.Appointment.BackColor =   Drawing.Color.Red
    Else
        e.Appointment.BackColor =   Drawing.Color.Orange
Sub 

but this code only applies for the time slot that already attached to an appointment, so does anybody know how do i change the time slot color for the time slot that is not attached to an appointment?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Sep 2008, 10:49 AM
Hi Wielyanto,

You need to use the TimeSlotCreated event and set the CssClass property for the TimeSlot object:

protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)  
    {  
        e.TimeSlot.CssClass = "OrangeStyle";  
    } 

<head runat="server">  
    <style type="text/css">  
      .OrangeStyle  
      {  
        background: orange !important;  
      }  
    </style>  
</head> 


Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Wielyanto
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or