473,320 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

One of 12 Calendars DayRender event does not work on PostBac

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
Dec 28 '05 #1
1 2039
COULD SOMEONE PLEASE HELP ME ON THIS?
Mariano

"Mariano Padilla" wrote:
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

Jan 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Superman and the Seven Dwarfs | last post by:
when the page is loaded, the dayrender event is triggered, which displays content, such as holidays, on the asp:calendar control. how do i programmatically re- dayrender a calendar so that when i...
0
by: CodeRazor | last post by:
Hi, I have been using the DayRender event of the calendar control to format the appearance of my calendar control, and it works ok. However, because of the way the DayRender event works, it...
2
by: Bruce W..1 | last post by:
I want to change the display style of certain days in my Calendar control. This is done with the DayRender event. So I put this in the codebehind: private void Calendar1_DayRender (object...
2
by: VB Programmer | last post by:
How can I force the DayRender event of my Calendar to run/refresh? The calendar displays data from a database and I am allowing the user to filter out what data they see on the calendar. When...
0
by: Mariano Padilla | last post by:
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...
1
by: Peter | last post by:
I tried to initialize a date in Calendar control with DayRender event handler as the following code: protected void Calendar1_DayRender(object sender, DayRenderEventArgs e){ e.Cell.ForeColor =...
0
by: dodjem | last post by:
Hi all, I have search far and wide for a solution but have been unsuccessful. I have a database table which contains bookings for resources that can be used in our lab and some bookings can...
0
by: champagne.supernova1974 | last post by:
Hi Can anyone help with a quick question? I am adding a textbox into each "day" cell of a calendar control, by using the following code in the DayRender event: Protected Sub...
2
by: Tigers07 | last post by:
I've been banging my head on a problem all day and am looking for some advice. I'm fairly new to asp.net/vb.net so I appologize if this seems a bit elementary. Anyway, what I'm doing is displaying 12...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.