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

Change background colors for days on Scheduler

1 Answer 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 25 May 2010, 04:44 PM
Hi,
I'd like to rotate 3 different background colors on a daily basis on the RadScheduler.
Example:
Monday = Red,
Tues = Yellow,
Wed = Blue
Thurs = Red (again)
Fri = Yellow (again)
Sat = Blue (again)   ....And so on, in order of Red, Yellow, Blue.

What's the best way to go about doing this?
Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 May 2010, 02:28 PM
Hi Ben,

Here is an example on how to change the background color of TimeSlot based on the day of week.

C#:
 
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)  
    {  
        if (e.TimeSlot.Start.DayOfWeek == DayOfWeek.Monday)  
        {  
            e.TimeSlot.Control.BackColor = System.Drawing.Color.Red;  
        }  
        else if (e.TimeSlot.Start.DayOfWeek == DayOfWeek.Tuesday)  
        {  
            e.TimeSlot.Control.BackColor = System.Drawing.Color.Yellow;  
        }  
    } 


Thanks,
Princy.
Tags
Scheduler
Asked by
Ben
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or