This is a migrated thread and some comments may be shown as answers.

change color of weekday names in grouped radscheduler

4 Answers 163 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 01 Nov 2012, 02:54 AM
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

4 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 02 Nov 2012, 03:16 PM
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.
0
Scorpy47
Top achievements
Rank 1
answered on 14 Jan 2013, 11:48 PM
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
0
Scorpy47
Top achievements
Rank 1
answered on 15 Jan 2013, 03:41 AM
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";
                    });
0
Stephen
Top achievements
Rank 1
answered on 15 Jan 2013, 01:29 PM
thank you
Tags
Scheduler and Reminder
Asked by
Stephen
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Scorpy47
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
Share this question
or