473,508 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

updating an arraylist between postbacks caused by Calendar Selecti

I have two arraylists that populate two Grid controls.
I have two Calendar controls to select a 'From' and 'To' date to filter what
is in the grid for subsequent filtered views of the what is contained in the
lower grid.

The rows of the grid are derived unbound through an arraylist of objects
that contain the column values. I am using Session Variables to store the
arraylist contents on the inital Page_Load after making initial database
selects to populate the grid. BuildGrid() is called at the end of the
Page_Load when IsPostBack = False.

A postback is called on the Calendar SelectionChanged event and one of the
arraylists is updated with the new filtered contents. Whether I call the
BuildGrid() function straigthaway after the database call, or
response.redirect back to the page for the Page_Load to take effect, the
results are that I never see the grid updated witht the new values. Or one of
the arraylists has become "nothing."

How should I handle these arraylists in the Calendar SelectionChanged event?
Are Session Variables always re-initialized with any values assigned to them?

Thank you for any help, even if it is just a request to be more clear! -hazz

Nov 19 '05 #1
1 1426
I ended up making the database calls directly before the grid building. There
are no state problems anymore and no Session variable complications. It
works. -hazz

"hazz" wrote:
I have two arraylists that populate two Grid controls.
I have two Calendar controls to select a 'From' and 'To' date to filter what
is in the grid for subsequent filtered views of the what is contained in the
lower grid.

The rows of the grid are derived unbound through an arraylist of objects
that contain the column values. I am using Session Variables to store the
arraylist contents on the inital Page_Load after making initial database
selects to populate the grid. BuildGrid() is called at the end of the
Page_Load when IsPostBack = False.

A postback is called on the Calendar SelectionChanged event and one of the
arraylists is updated with the new filtered contents. Whether I call the
BuildGrid() function straigthaway after the database call, or
response.redirect back to the page for the Page_Load to take effect, the
results are that I never see the grid updated witht the new values. Or one of
the arraylists has become "nothing."

How should I handle these arraylists in the Calendar SelectionChanged event?
Are Session Variables always re-initialized with any values assigned to them?

Thank you for any help, even if it is just a request to be more clear! -hazz

Nov 19 '05 #2

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

Similar topics

4
3866
by: Stephen | last post by:
I have got an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I...
2
7803
by: Stephen | last post by:
I am trying to delete a row in a datagrid on the onclick of a asp:ButtonColumn. The datagrid is created from the items in an arraylist so what im trying to do is remove the item from the array and...
1
9873
by: Stephen | last post by:
I have an event below to remove items from an arraylist and then to rebind the arraylist to the datagrid subsequently deleting the appropriate row. My problem is that my code makes sense and I...
3
2840
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
1
1358
by: MattB | last post by:
Hi. I posted yesterday about being able to get to Day.IsSelecteable from outside the calendar's DayRender event. I never figured that out, so I found another way to do what I needed by...
6
4303
by: Desmond Cassidy | last post by:
Hi, I'm sure this has been asked several times before but I'll risk it ;-) If I wish to save an Arraylist to another Arraylist and work on te original without affecting the contents of the new...
0
1663
by: Grant Wickman | last post by:
Our team has just fixed a really nasty problem that appears to be caused by an obscure bug in the sort method of Arraylist and daisy-chained webservice stubs. We've fixed the bug so I'll not...
1
1161
by: Nathan Sokalski | last post by:
As we all know, the Calendar control causes postbacks that we often do not want. This will obviously cause the Page's Load event to be triggered. I have code in my Load event that I want executed...
1
2026
by: EyeHawk | last post by:
OK, hopefully somebody can help me out again. My next problem is updating 3 form fields (type list/menu option) that correspond to a date, one for month, one for day and one for year when the user...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.