DataGrid Automatic Refresh

P

Patrick Delifer

Hi All (Any help is appreciated)

Let's say I have a web page (.aspx) where the top portion is an Order entry
and the Bottom part is a Datagrid which displays the orders.

When the user creates an Order, the datagrid is automatically refreshed with
the new order.(using dataBind event). This works great.

The problem is, when or if an order is created somehwere else (another
user). I want to be able to refresh my datagrid (or refetch a DataBind)
using a time lapse (20 sec for example)..So that users should see the new
orders created without submitting a request to the server by clicking a
button...

I tried using a <META refresh HTML tag, but the problem is that when users
are entering data, they loose everything when the refresh is executed and
have to start reentering
the data..

Now my options are:
1. to refresh only the datagrid part of my page..(but how? using a
JavaScript?)
2. Use Frames? (Top for entry and Bottom for datagrid?) but how would I send
a button command to execute a databind on the Bottom frame page?
3. How would the HttpApplicationState object help in this context? or would
it?

thnaks for any help

Pat
 
A

Andrew de la Harpe

Patrick the frames idea is probably the best solution.
You can script across frames.
With an IFRAME it's really easy.
document.all('framename').src='myPage.aspx'; ( i think)
call this each time the parent page is loaded.

You could also watch keypress so if a key is pressed, the timer stops for x
seconds
that way the page won't refresh unless it's idle. Doesn't mean the user
isn't busy editing and talking on the phone.
but it may work out ok.

A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top