Timeline view: coloring

2 posts, 0 answers
  1. CH
    CH avatar
    48 posts
    Member since:
    Aug 2010

    Posted 02 Jan 2012 Link to this post

    Hi,
    Is there a way to do the following:
    a. color the day in Timeline view, we wanted to color blue if it is a public holiday for that day
    b. Freeze the Date header in timeline view, we wanted to freeze the Date row when we want to scroll bottom. Our RADSchedule is very long thus user unable to see the Date header.

    Thanks.

    Regards,
    CH
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 03 Jan 2012 Link to this post

    Hello,

    To color the day cell in Timeline view you could subscribe to the TimeSlotCreated event, and color the time slots if they satisfy certain criteria.
    Example:
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
    {
        if (e.TimeSlot.Start == DateTime.Today)
        {
            e.TimeSlot.CssClass = "myClass";
        }
    }
    .myClass
    {
        background-color: Red;
    }
    <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="TimelineView"
        OnTimeSlotCreated="RadScheduler1_TimeSlotCreated">

    Here is a demo for reference -
    http://demos.telerik.com/aspnet-ajax/scheduler/examples/customizetimeslots/defaultcs.aspx

    As for the date row in TimelineView -- it stays static when the appointment's container scrolls to the bottom and back to the top. You could take a look at the following demo for more info: RadScheduler / Customization.

    Kind regards,
    Ivana
    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
Back to Top