I want to change the color of the hours column programmatically. So I want to have some of the hour labels in one color and other labels in other colors. Is there a way to do this?
1 Answer, 1 is accepted
0
Peter
Telerik team
answered on 12 Jul 2010, 05:20 PM
Hello Michael,
Thank you for this question. We have replied in the support ticket you sent us, but for community reference here is the solution we proposed:
If you have two RadScheduler instances, then you need to extend the code as follows:
ProtectedSubRadScheduler1_TimeSlotCreated(sender AsObject, e AsTimeSlotCreatedEventArgs)
Ife.TimeSlot.Start.Hour = 15 OrElsee.TimeSlot.Start.Hour = 20 Then
e.TimeSlot.CssClass = "Red1"
ElseIfe.TimeSlot.Start.Hour = 9 OrElsee.TimeSlot.Start.Hour = 11 Then
e.TimeSlot.CssClass = "Green1"
EndIf
EndSub
ProtectedSubRadScheduler2_TimeSlotCreated(sender AsObject, e AsTimeSlotCreatedEventArgs)
Ife.TimeSlot.Start.Hour = 14 OrElsee.TimeSlot.Start.Hour = 19 Then
e.TimeSlot.CssClass = "Red2"
ElseIfe.TimeSlot.Start.Hour = 8 OrElsee.TimeSlot.Start.Hour = 10 Then
e.TimeSlot.CssClass = "Green2"
EndIf
EndSub
Basically, the idea is to set unique CssClass for each scheduler and with jQuery add a second parameter to the selector to make sure that this is the table that you need to target
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items