Styling 15 mintues slots in RedSchedular

Posted by user296386 on Stack Overflow See other posts from Stack Overflow or by user296386
Published on 2010-03-18T10:00:18Z Indexed on 2010/03/18 10:01 UTC
Read the original article Hit count: 290

Filed under:

Is there any way to change the colour of 15 mintues slot's . I found the article in which it's showed how the change the colour for an hour slot. below is my code. please can help me how to change the colour of 15 minutes slots. thanks

protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e)

{

if (dsAppointments == null)

{

dsAppointments = GetAppointments(

this.RadScheduler1.SelectedDate);

}

foreach (DataRow row in dsAppointments.Tables[0].Rows)

{

DateTime start = Convert.ToDateTime(row["start"]);

DateTime end = Convert.ToDateTime(row["end"]);

if (e.TimeSlot.Resource.Text == Convert.ToString(row["StaffName"]))

{

if ((e.TimeSlot.Start.Date.ToShortDateString() == start.ToShortDateString()) && ((e.TimeSlot.Start.Hour >= start.Hour && e.TimeSlot.End.Hour <= end.Hour )))

{

e.TimeSlot.CssClass =

"Disabled";

}

}

}

}

© Stack Overflow or respective owner

Related posts about telerik