Declined
Last Updated: 01 Nov 2013 13:06 by ADMIN
Carlos
Created on: 26 Apr 2013 17:18
Category: Ajax
Type: Feature Request
0
RadCalendar dayrender event
Running for the firts time, the calendar displays correctly the things i want to; but if I navigate to another monts in the calendar, the event is is not fired, so the render of the things I want seems not to work.

This si the code:

Protected Sub RadCalendar1_DayRender(ByVal sender As Object, _
ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) _
Handles RadCalendar1.DayRender
    Dim CurrentDate As DateTime = e.Day.[Date]
    If CurrentDate.Month <> RadCalendar1.FocusedDate.Month Then
        e.Cell.Text = "(" + CurrentDate.Day + ")"
    ElseIf e.Day.IsToday Then
        e.Cell.Style("background-color") = "Red"
    End If
End Sub

Thanks
1 comment
ADMIN
Radoslav
Posted on: 21 Oct 2013 12:39
Hi Carlos,

This is an expected behavior. The RadCalendar initially is rendered from the server and for all days the DayRender event is fired. However when you navigate to the next or previous moth, the calendar view is recreated on the client and client side DayRender event is fired. If you want to fire server side DayRender event you need to set RadCalendar.AutoPostBack property to "true".

Regards,
Radoslav