Hello Telerik's Team !
I wanted to add SpecialDays with method AddRange(Array of RadCalendarDays) but it don't seems to fully work. Maybe i'm missing something ? I'm using DotNetNuke, and I'm trying to show on the calendar the days which contain an event.
If you look on my screenshots, the orange days are those with event. So the SpecialDays method works fine, but for the event planned on the 28 January, it only appears if I move to February then come back to January. For more, in debug many others days are added to the List(of RadCalendarDay) but they doesn't appear on the calendar. I've also tryed the SpecialDays.Add() and many many other tricks ...
- 28 January event doesn't appear : http://88.191.55.88/Screenshot-20090127-113340.png
- I move to February : http://88.191.55.88/Screenshot-20090127-113424.png
- Then come back to January : http://88.191.55.88/Screenshot-20090127-113444.png
Sébastien
I wanted to add SpecialDays with method AddRange(Array of RadCalendarDays) but it don't seems to fully work. Maybe i'm missing something ? I'm using DotNetNuke, and I'm trying to show on the calendar the days which contain an event.
If you look on my screenshots, the orange days are those with event. So the SpecialDays method works fine, but for the event planned on the 28 January, it only appears if I move to February then come back to January. For more, in debug many others days are added to the List(of RadCalendarDay) but they doesn't appear on the calendar. I've also tryed the SpecialDays.Add() and many many other tricks ...
- 28 January event doesn't appear : http://88.191.55.88/Screenshot-20090127-113340.png
- I move to February : http://88.191.55.88/Screenshot-20090127-113424.png
- Then come back to January : http://88.191.55.88/Screenshot-20090127-113444.png
<telerik:RadCalendar ID="radCalSearch" runat="server" EnableMultiSelect="true" EnableNavigationAnimation="false" |
FastNavigationNextImage="~/images/btn_RadCal_FN.jpg" |
FastNavigationPrevImage="~/images/btn_RadCal_FP.jpg" |
NavigationNextImage="~/images/btn_RadCal_N.jpg" |
NavigationPrevImage="~/images/btn_RadCal_P.jpg" |
ShowRowHeaders="true" DayNameFormat="FirstTwoLetters" > |
<SpecialDays> |
<telerik:RadCalendarDay Date="" Repeatable="Today"> |
<ItemStyle CssClass="radCalToday_Default" /> |
</telerik:RadCalendarDay> |
</SpecialDays> |
</telerik:RadCalendar> |
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load |
Try |
If (Page.IsPostBack = False) Then |
[...] |
SetExistingDates() |
End If |
Catch exc As Exception 'Module failed to load |
ProcessModuleLoadException(Me, exc) |
End Try |
End Sub |
Private Sub SetExistingDates() |
Dim objArticleController As New ArticleController |
Dim objArtList As List(Of ArticleInfo) = objArticleController.GetArticleList(intSourceModuleId, True) |
Dim objExistingDates As New List(Of Telerik.Web.UI.RadCalendarDay) |
For Each objArticle As ArticleInfo In objArtList |
If objArticle.EventStartDate <> Null.NullDate Then |
' we have an event, displaying the startDate |
Dim objDate As New Telerik.Web.UI.RadCalendarDay |
objDate.Date = objArticle.EventStartDate |
objDate.ItemStyle.CssClass = "radCalDefault_Default radCalDefault_EventDay" ' Set CssClass to the day |
If Not ExistingDateIsNotAlreadyOnTheCollection(objExistingDates, objDate.Date) Then |
objExistingDates.Add(objDate) ' Add the specialDay into List |
End If |
If objArticle.EventEndDate <> Null.NullDate Then |
' we have a endDate, we display all the days between Start and End. |
If objArticle.EventStartDate < objArticle.EventEndDate Then ' should be unusefull |
While objDate.Date < objArticle.EventEndDate.Date |
objDate.Date = objDate.Date.AddDays(1) ' Next day |
If Not ExistingDateIsNotAlreadyOnTheCollection(objExistingDates, objDate.Date) Then |
objExistingDates.Add(objDate) |
End If |
End While |
End If |
End If |
Else |
End If |
Next |
If Not objExistingDates Is Nothing Then |
Me.radCalSearch.SpecialDays.AddRange(objExistingDates.ToArray) |
End If |
End Sub |
Sébastien