G
Guest
I poste the below on 11-28-05 and got no answer. Could anyone please help me?
I have a form that has 12 Calendar, 1 for each month. I am retrieving
information from a database separately, assigning them to an array and then
in the DayRender Event, itterating through the array to mark the days that I
have in the database for each calendar. Basically a year view of what dates
are blocked and what days are free. Booking calendar.
The problem is that when the page posts back, the first 11, Jan-Nov,
calendars work. December's postback blanks out all dates as if it has
nothing marked. However, if I close the page and open it again, then
December's calendar works fine. It is only on PostBack that the callendar
does not fire the PostBack event.
Is there a limit for how many calendars one can use on a page?
Is there another way to force the DayRender event to trigger?
How can I verify that all of the DayRender Events have been triggered.
Below is my DayRender Code only for 2 caledars. Notice they are exactly the
same, except for the calendar ID.
Private Sub Calendar11_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar11.DayRender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Month = Month(datinf(c)) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColor = System.Drawing.Color.Red
End If
End If
Next c
End Sub
Private Sub Calendar12_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar12.DayRender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Month = Month(datinf(c)) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColor = System.Drawing.Color.Red
End If
End If
Next c
End Sub
I have a form that has 12 Calendar, 1 for each month. I am retrieving
information from a database separately, assigning them to an array and then
in the DayRender Event, itterating through the array to mark the days that I
have in the database for each calendar. Basically a year view of what dates
are blocked and what days are free. Booking calendar.
The problem is that when the page posts back, the first 11, Jan-Nov,
calendars work. December's postback blanks out all dates as if it has
nothing marked. However, if I close the page and open it again, then
December's calendar works fine. It is only on PostBack that the callendar
does not fire the PostBack event.
Is there a limit for how many calendars one can use on a page?
Is there another way to force the DayRender event to trigger?
How can I verify that all of the DayRender Events have been triggered.
Below is my DayRender Code only for 2 caledars. Notice they are exactly the
same, except for the calendar ID.
Private Sub Calendar11_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar11.DayRender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Month = Month(datinf(c)) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColor = System.Drawing.Color.Red
End If
End If
Next c
End Sub
Private Sub Calendar12_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar12.DayRender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Month = Month(datinf(c)) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColor = System.Drawing.Color.Red
End If
End If
Next c
End Sub