473,402 Members | 2,064 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,402 software developers and data experts.

Refreshing a datagrid at predetermined intervals?

Tom
I have an ASP.NET web page coded in VB.NET (2003). That web page has a
dropdown box on it which is loaded during the page_load event. When the user
drops this down and selects a data item, the code reads the database (based
upon what they selected, of course) and then loads the appropriate data into
the grid for display.

Now, however, I need to have the grid 'refreshed' at certain intervals. For
instance, if they leave the browser page alone, in 30 seconds (of
inactivity) I want the screen to 'refresh' - but really just re-read the
database (based upon the selected dropdown item) and repopulate the grid.

I thought I could do this with a meta tag (<meta HTTP-EQUIV="Refresh"
CONTENT="30;">); although this works (in that the screen does refresh) it is
not a programmed refresh. In my case, the page_load is re-executed and it
thinks it is NOT a postback so the screen is reset back to it's initial
defaults (i.e. the grid is cleared, set to NOT visible, and the dropdown is
reloaded and set back to it's non-selected default). What I need is some
kind of programmed refresh; something like - after a set time it will cause
an event to fire where I can see if the drop down value is the same and if
so, then re-read the database and refresh the grid.

There is no Timer in VB/ASP so I am not sure how to implement something like
this, if it is even possible. Any ideas? I am sure someone has had this kind
of need in the past.

Thanks in advance.

Tom
Nov 18 '05 #1
1 1408
look at the JavaScript SetTimeout() and have it call a Form.Submit()
It's a clientside thing, nothing to do with server-side programming.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Tom" <to*@nospam.com> wrote in message
news:ea**************@TK2MSFTNGP11.phx.gbl...
I have an ASP.NET web page coded in VB.NET (2003). That web page has a
dropdown box on it which is loaded during the page_load event. When the
user
drops this down and selects a data item, the code reads the database
(based
upon what they selected, of course) and then loads the appropriate data
into
the grid for display.

Now, however, I need to have the grid 'refreshed' at certain intervals.
For
instance, if they leave the browser page alone, in 30 seconds (of
inactivity) I want the screen to 'refresh' - but really just re-read the
database (based upon the selected dropdown item) and repopulate the grid.

I thought I could do this with a meta tag (<meta HTTP-EQUIV="Refresh"
CONTENT="30;">); although this works (in that the screen does refresh) it
is
not a programmed refresh. In my case, the page_load is re-executed and it
thinks it is NOT a postback so the screen is reset back to it's initial
defaults (i.e. the grid is cleared, set to NOT visible, and the dropdown
is
reloaded and set back to it's non-selected default). What I need is some
kind of programmed refresh; something like - after a set time it will
cause
an event to fire where I can see if the drop down value is the same and if
so, then re-read the database and refresh the grid.

There is no Timer in VB/ASP so I am not sure how to implement something
like
this, if it is even possible. Any ideas? I am sure someone has had this
kind
of need in the past.

Thanks in advance.

Tom

Nov 18 '05 #2

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

Similar topics

0
by: serge calderara | last post by:
Dear all, I am develpping a .NET vb application fro 2000 and XP. I have actually an Collection list of Type, where type have 4 variables inside This collection list can be really long. I then...
0
by: msnews | last post by:
Hi -- I'm very, very new to ASP.Net, and I've been trying for several days to figure out how to update a datagrid AND refresh it on the client side so that the page doesn't refresh. I've torn my...
5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
1
by: Hans | last post by:
I have a Windows.Forms.Form containing a DataGrid where the DataSource is a DataView. Everything refreshes fine after adding, deleting or editing rows. When I close the dialog and reopen it with a...
7
by: A.M | last post by:
Hi, I want to refresh my DataGrid data on every postback. I have following code in Page_Load event, but after first page load, the DataGrid never gets refresh. Here is the code i have in...
4
by: Rod | last post by:
I posted a message to this group yesterday asking how to pass parameters to a web form that is the source of an IFrame on a parent web form. I've gotten my answer, and it works. Thanks! Now I...
1
by: Jennyfer J Barco | last post by:
Hello I have a datagrid and a linkbuttom in the datagrid that says Picture, every time I click on the link "Picture" my program opens a popup window showing a picture of the item the selected and...
0
by: rraw | last post by:
hello! i have a poblem refreshing the datagrid the datagrid gets updated but what should i do in order to make the grid invisible once i am thru the dataviewing from the datagrid.. plz help me out
17
lee123
by: lee123 | last post by:
I know this is a free site and the moderators or anybody don't have to answer if they don't want to.. but if there is someone who knows how to answer this question please help with this one. i...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.