I'm writing this follow source code in VS2008 and I nocited that the first time the calendar load hasn't the days highlights. If I move to the next or previous month and then I come back to Agoust the days are correctly highlights. I might be doing something wrong, but what ???
Private Sub RadCalendar1_ElementRender(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RenderElementEventArgs) Handles RadCalendar1.ElementRender
Dim ProcessOK As Boolean = False
Dim dates As List(Of DateTime) = New List(Of DateTime)()
dates.Add(
New DateTime(2008, 8, 11, 0, 0, 0, 0))
dates.Add(
New DateTime(2008, 8, 12, 0, 0, 0, 0))
dates.Add(
New DateTime(2008, 8, 13, 0, 0, 0, 0))
dates.Add(
New DateTime(2008, 8, 14, 0, 0, 0, 0))
Dim i As Integer = 0
Do While i < dates.Count
If dates(i).Date.Equals(e.Day.Date) Then
ProcessOK =
True
End If
i += 1
Loop
If ProcessOK Then
e.Element.DrawFill =
True
If cellBackColor = Color.Empty Then
cellBackColor = e.Element.BackColor
End If
e.Element.BackColor = Color.Orange
e.Element.Invalidate()
Else
If cellBackColor <> Color.Empty Then
e.Element.BackColor = cellBackColor
End If
If Not (TryCast(e.Element, CalendarCellElement)).Selected Then
e.Element.DrawFill =
False
Else
TryCast(e.Element, CalendarCellElement).Selected = True
e.Element.DrawFill =
True
End If
End If
ProcessOK =
False
End Sub