change color of weekday names in grouped radscheduler

5 posts, 0 answers
  1. Stephen
    Stephen avatar
    2 posts
    Member since:
    Jun 2011

    Posted 31 Oct 2012 Link to this post

    Hello,
       I am using RADScheduler Q3-2012 and find the text color of the resource headers hard to read on the dark background when grouped. I found the code to change the color of the header on timeline view in this forum(thanks) and figured out how to change day, week and month but I would also like to change the header that shows the name of the weekdays in monthview since that is also too dark to read when grouped.
    Any help in how to address these colors would be greatly appreciated.
    Here is what I have so far: 
    Private Sub adjustGroupHeader()
        If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Timeline Then
            Dim element As TimelineGroupingByResourcesElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, TimelineGroupingByResourcesElement)
            element.Font = New Font("Arial", 22)
            element.ForeColor = Color.Yellow
        End If
        If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Day Then
            Dim element As SchedulerDayViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement)
            element.Font = New Font("Arial", 16)
            element.ForeColor = Color.Yellow
        End If
        If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Week Then
            Dim element As SchedulerDayViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerDayViewGroupedByResourceElement)
            element.Font = New Font("Arial", 16)
            element.ForeColor = Color.Yellow
        End If
        If RadScheduler1.GroupType = GroupType.Resource And RadScheduler1.ActiveViewType = SchedulerViewType.Month Then
            Dim element As SchedulerMonthViewGroupedByResourceElement = TryCast(Me.RadScheduler1.SchedulerElement.ViewElement, SchedulerMonthViewGroupedByResourceElement)
            element.Font = New Font("Arial", 16)
            element.ForeColor = Color.Yellow
            'code needed to change forecolor/backcolor of weekday names
        End If
    End Sub
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 02 Nov 2012 Link to this post

    Hi Stephen,

    Thank you for contacting us.

    Changing the BackColor of the view element is not a good approach in this case because RadScheduler reinitializes its elements under specific circumstances and you can lose your color settings. The best approach is to set the Color property of your resources. This way you will get the resource headers and the weekday headers colored in the specific color of the resource. The following help article demonstrates assigning color to the resources. In case you are using data binding, you can just traverse the Resources collection after it has been loaded and set the Color of each resource.

    I hope you find this useful. Feel free to ask if you have any additional questions.

    All the best,
    Ivan Todorov
    the Telerik team
    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Karthik
    Karthik avatar
    19 posts
    Member since:
    Aug 2012

    Posted 14 Jan 2013 Link to this post

    Hi,
     I managed to change the header and others with the help of a suggestion you made here and that was effective. I have attached a JPG which does not show the day's name because of the background, how can I change the color of the day in this radscheduler using the css? (under asp .net) Any help is much appreciated.
    Thank you in anticipation.
    Regards,
    Karthik
  5. Karthik
    Karthik avatar
    19 posts
    Member since:
    Aug 2012

    Posted 14 Jan 2013 Link to this post

    I managed ...  we can tweak if we need specific days / sun/sat etc...

      $telerik.$(".rsHorizontalHeaderTable th").each(function(index, item) {
                            item.style.background = "your color";
                        });
  6. Stephen
    Stephen avatar
    2 posts
    Member since:
    Jun 2011

    Posted 15 Jan 2013 Link to this post

    thank you
Back to Top
UI for WinForms is Visual Studio 2017 Ready