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

[Solved] Change color for a certain day in Timeline?

2 Answers 123 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Magnus
Top achievements
Rank 1
Magnus asked on 07 Oct 2009, 09:31 AM
Hi there.

I'm trying to change backgroundcolor for a certain day in a timeline. Is that in any way possible? (Look at the attached image for a clearer view of what i'm trying to do).

i want to make the background color gray for that day.


Very grateful for all kind of help.

Regards / Magnus.

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 07 Oct 2009, 10:32 AM
Hi Magnus,

I tried following code snippet for applying background color for particular day in TimeLineView. Give a try with this.

C#:
 
protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e) 
    if (RadScheduler1.SelectedView == SchedulerViewType.TimelineView) 
    { 
        if (e.TimeSlot.Start.Date == DateTime.Now.Date) 
        { 
            e.TimeSlot.CssClass = "MyClass"
        } 
    } 

CSS:
 
<style type="text/css"
.MyClass .rsWrap 
    background-color: Red !important; 
}     
</style> 

Thanks,
Princy.
0
Magnus
Top achievements
Rank 1
answered on 07 Oct 2009, 10:42 AM
That did the trick!

Thanks a million man!


/ Magnus
Tags
Scheduler
Asked by
Magnus
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Magnus
Top achievements
Rank 1
Share this question
or