How to change the Rad-scheduler sidebar back color in Worker view

2 posts, 0 answers
  1. Sugu
    Sugu avatar
    4 posts
    Member since:
    Oct 2018

    Posted 29 Oct 2018 Link to this post

     While selecting the worker view the RadScheduler sidebar is not changed. Is there are any possibilities to replace the color code like 191, 219, 255.

     Reference link: https://drive.google.com/file/d/1Uvwi8wO-ccKf_2ZMbURxEWcnK4S3IIG6/view
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3323 posts

    Posted 30 Oct 2018 Link to this post

    Hello, Sugu, 

    Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting. I would kindly ask you to use our support ticketing system for any further questions as it is the proper way to reach our support staff. Thank you for your understanding.

    As a gesture of good will we will address this thread for you. According to the provided screenshot it seems that you use RadScheduler grouped by resources. Note that when adding a Resource, you can specify its Color property. Thus, you can control the color of the cells associated with this resource. 

    Color[] colors = new Color[]
    {
        Color.LightBlue, Color.LightGreen, Color.LightYellow,
        Color.Red, Color.Orange, Color.Pink, Color.Purple, Color.Peru, Color.PowderBlue
    };
    string[] names = new string[]
    {
        "Alan Smith", "Anne Dodsworth",
        "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"
    };
    for (int i = 0; i < names.Length; i++)
    {
        Resource resource = new Resource();
        resource.Id = new EventId(i);
        resource.Name = names[i];
        resource.Color = colors[i];
        this.radScheduler1.Resources.Add(resource);
    }
    this.radScheduler1.GroupType = GroupType.Resource;


    Alternatively, you can customize the resource header cells by handling the CellFormatting event as it is demonstrated below: 

    private void radScheduler1_CellFormatting(object sender, SchedulerCellEventArgs e)
    {
        if (e.CellElement is SchedulerResourceHeaderCellElement)
        {
            e.CellElement.DrawFill = true;
            e.CellElement.BackColor = Color.Red;
            e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
        }
        else
        {
            e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
        }
    }

    I hope this information helps.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top