Dear all,
We are using the RadScheduler in TimelineView, grouped by employee..
Can we set the background-color by row programmatically? Would like to have a slight different color on the odd lines, like commonly seen in the RadGrid.
Cheers, Zeo Smeijsters
We are using the RadScheduler in TimelineView, grouped by employee..
Can we set the background-color by row programmatically? Would like to have a slight different color on the odd lines, like commonly seen in the RadGrid.
Cheers, Zeo Smeijsters
6 Answers, 1 is accepted
0
Hello Zeo,
Hope this will be helpful.
Regards,
Plamen Zdravkov
the Telerik team
You can handle the TimeSlotCreated event and add the desired css class as in the code:
protected
void
RadScheduler1_TimeSlotCreated(
object
sender, TimeSlotCreatedEventArgs e)
{
if
(e.TimeSlot.Resource.Text==
"Alex"
|| e.TimeSlot.Resource.Text==
"Charlie"
)
{
e.TimeSlot.CssClass =
"red"
;
}
}
.
red
{
background-color
:Red
!important
;
}
Hope this will be helpful.
Regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Zeo
Top achievements
Rank 1
answered on 22 Mar 2012, 05:10 PM
Great!!!! Thanks, did not think(know) there is an TimeSlotCreated event.
My solution:
My solution:
.RowOdd { background-color:#E6F4F7!important; }
protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e) { string index = e.TimeSlot.Index; index = index.Substring(0,index.IndexOf(':')); if (Convert.ToInt32(index) % 2 == 1) { e.TimeSlot.CssClass = "RowOdd"; } }
0
Kamlesh
Top achievements
Rank 1
answered on 23 Mar 2012, 11:22 AM
We have to change the back color of scheduler based on Office hour of employee (DayStartTime and DayEndTime).
Thanks & Regards
Kamlesh
Thanks & Regards
Kamlesh
0
Hi Kamlesh,
Plamen Zdravkov
the Telerik team
You can use the e.TimeSlot.Start.Hour in the TimeSlotCreated event as it is done in the Customize Time Slot demo.
Hope this will be helpful.
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kamlesh
Top achievements
Rank 1
answered on 26 Mar 2012, 08:37 AM
Thanks
0
Mats
Top achievements
Rank 1
answered on 04 Oct 2013, 08:29 AM
You Sir Rock.
there ain't enough words to describe the awsomeness of you row color solution..
Thanks for posting it, trying to do this for some time now.
/Mats
there ain't enough words to describe the awsomeness of you row color solution..
Thanks for posting it, trying to do this for some time now.
/Mats