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

[Solved] Different Colors

1 Answer 145 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
nagesh Mynedi
Top achievements
Rank 1
nagesh Mynedi asked on 24 Oct 2009, 05:08 AM
I wan to put different colors for days like sunday=green ,monday=blue tuesday=red wenesday=black ............................... like this.. how can it possible..

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Oct 2009, 05:58 AM
Hello Nagesh,

I guess you want to set different color to the time slots. If that the case, you can try following approach.

C#:
 
protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e) 
    switch (e.TimeSlot.Start.Date.DayOfWeek) 
    { 
        case DayOfWeek.Monday: 
            e.TimeSlot.CssClass = "Monday"
            break
        case DayOfWeek.Sunday: 
            e.TimeSlot.CssClass = "Sunday"
            break
        case DayOfWeek.Wednesday: 
            e.TimeSlot.CssClass = "Wednesday"
            break
        case DayOfWeek.Tuesday: 
            e.TimeSlot.CssClass = "Tuesday"
            break
        default
            break
    } 

And the CSS:
 
    <style type="text/css"
        .Monday 
        { 
            background-colorblue !important; 
        } 
        .Sunday 
        { 
            background-colorgreen  !important; 
        } 
        .Wednesday 
        { 
            background-colorblack  !important; 
        } 
        .Tuesday 
        { 
            background-colorred  !important; 
        } 
    </style> 

Hope this would help,
Shinu.
Tags
Scheduler
Asked by
nagesh Mynedi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or