I have a schedule control and a calendar control on a form.
When a user clicks on a cell in the schedule control (in timeline view), the calendar updates to show, as specialdays, all the days for the month that has the day in it that the user selected.
The specialdays and focusedDate have a very similar colour and I want to recolour the special days and focuseddate colours so they are easily identifiable.
Ive started changing the special days color, but when a user clicks in a different scheduler cell, the background color of the calendar remains how it was set previously.
I'm using the ElementRender event of the calender control to see if its a special day, and if it is colour it. I'm not sure how to reset it if it isnt.
Code below, and any help greatly appreciated.
When a user clicks on a cell in the schedule control (in timeline view), the calendar updates to show, as specialdays, all the days for the month that has the day in it that the user selected.
The specialdays and focusedDate have a very similar colour and I want to recolour the special days and focuseddate colours so they are easily identifiable.
Ive started changing the special days color, but when a user clicks in a different scheduler cell, the background color of the calendar remains how it was set previously.
I'm using the ElementRender event of the calender control to see if its a special day, and if it is colour it. I'm not sure how to reset it if it isnt.
Code below, and any help greatly appreciated.
private
void
Calendar_ElementRender(
object
sender, RenderElementEventArgs e)
{
foreach
(RadCalendarDay date
in
((RadCalendar)sender).SpecialDays)
{
if
(e.Day.Date == date.Date)
{
e.Element.BackColor = Color.Red;
return
;
}
}
}