Y
yobofunk
On my page, I have a gridview that must update every 5 seconds. To
implement this, I use the client callback feature.
On the server-side, I have a function which takes the GridView object
on the page and calls the DataBind() method on it. Thereafter, I take
that GridView object and return it's HTML-equivalent to the client.
On the client-side, i have a procedure which loops every 5 seconds.
When it hears back from the server, it takes the HTML-equivalent of the
Gridview and makes the replacement necessary.
I really like this approach as it looks great (i.e. no blinking as
there is no "refresh" going on)
Anyhow, the problem I am facing is performance. Changing my refresh
rate is no allowed (customer has made it mandatory that it refreshes
every 5 seconds). What I figure would work is to check my
gridview/datasource object to see if it has changed - if yes, then
return the Gridview's HTML, else, return -1 and on the client side,
change the code where appropriate.
So I guess the real problem is - how do I detect whether or not a
Gridview/datasource has changed ? Note that my datasource is based on
a stored procedure across multiple tables.
Thanks in advance
Ed
implement this, I use the client callback feature.
On the server-side, I have a function which takes the GridView object
on the page and calls the DataBind() method on it. Thereafter, I take
that GridView object and return it's HTML-equivalent to the client.
On the client-side, i have a procedure which loops every 5 seconds.
When it hears back from the server, it takes the HTML-equivalent of the
Gridview and makes the replacement necessary.
I really like this approach as it looks great (i.e. no blinking as
there is no "refresh" going on)
Anyhow, the problem I am facing is performance. Changing my refresh
rate is no allowed (customer has made it mandatory that it refreshes
every 5 seconds). What I figure would work is to check my
gridview/datasource object to see if it has changed - if yes, then
return the Gridview's HTML, else, return -1 and on the client side,
change the code where appropriate.
So I guess the real problem is - how do I detect whether or not a
Gridview/datasource has changed ? Note that my datasource is based on
a stored procedure across multiple tables.
Thanks in advance
Ed