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

Sheduler across 5 year

1 Answer 69 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chun
Top achievements
Rank 1
Chun asked on 22 Jul 2008, 09:10 AM
hi,
I am using the sheduler for 5 year planning and was wondering how to present the data nicely. Since i am using timeline and have set the width to 3200px, i found that it is difficult to identify the appointments with its related year. I was wondering that if i could highlight the time slot for every year with different colors or you can provide other alternatives to improve the view.
The details are shown as following:
<TimelineView
GroupingDirection="Vertical" HeaderDateFormat="MM/yy" NumberOfSlots="60"  SlotDuration="31.00:00:00" GroupBy="Generation" /> 

regards,
Chun

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 24 Jul 2008, 02:35 PM

Hello Chun,

You can use the TimeSlotCreated event. Please, try the following code:

protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)  
    {  
        switch (e.TimeSlot.Start.Year)  
        {  
            case 2008:  
                e.TimeSlot.CssClass = "Style2008";  
                break;  
            case 2009:  
                e.TimeSlot.CssClass = "Style2009";  
                break;             
            case 2010:  
                e.TimeSlot.CssClass = "Style2010";  
                break;  
            case 2011:  
                e.TimeSlot.CssClass = "Style2011";  
                break;  
            case 2012:  
                e.TimeSlot.CssClass = "Style2012";  
                break;  
            case 2013:  
                e.TimeSlot.CssClass = "Style2013";  
                break;  
              
        }  
    } 

<style type="text/css">  
    .Style2008   
    {  
        backgroundred !important;  
    }  
    .Style2009  
    {  
        backgroundgreen !important;  
    }  
    .Style2010  
    {  
        background: orange !important;  
    }  
    .Style2011  
    {  
        backgroundblue !important;  
    }  
    .Style2012  
    {  
        backgroundyellow !important;  
    }  
    .Style2013  
    {  
        backgroundpurple !important;  
    }  
    </style> 


Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Chun
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or