Change backgound color of time slot in weekview

3 posts, 1 answers
  1. Mattia
    Mattia avatar
    36 posts
    Member since:
    Jan 2012

    Posted 27 Jan 2012 Link to this post

    I was wondering if it is possible to change the background color of the timeslot of the radscheduler control with WeekView, for specific hours? 
    I can do it inTimelineView:

            /*Timeline view*/ 
            div.rsContent .rsTimelineTable .MyCustomClass   
            {  
                background-color: #cccccc !important;  
            }
            
    and with this code

     protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
        {
                if ((e.TimeSlot.Start.ToString() == .....) and (e.TimeSlot.End.ToString() == ..... ))
                  {
                        e.TimeSlot.CssClass = "MyCustomClass";
                    }    
    }

    but in WeekView  the time slot is considered all day, e.TimeSlot.Start = "2012/01/23 00:00:00" e.TimeSlot.End="2012/01/24 00:00:00" so i can't set the background-color for specific hours, for example from 09:00 to 13:00.

    there is a way to do that? 
    thanks, Mattia

  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 27 Jan 2012 Link to this post

    Hi,

    Please, see the Customizing the Time Slots online demo and its related resources.

    Greetings,
    Peter
    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
  3. Mattia
    Mattia avatar
    36 posts
    Member since:
    Jan 2012

    Posted 31 Jan 2012 Link to this post

    Thanks, i solved
Back to Top