Datagridview Binding/Update Question


G

Guest

I have two questions.

1. Is there a way to keep the datagridview datasource constantly bound to a
sql db? So that as soon as a change takes place in the db by any user, it is
updated on all screens. If so, how is that done? If not, what is the best
practice to perform this type of function?

2. In refrence to above, I have a timer that refreshes the data every 3
minutes. One problem here is the screen flickers when it refreshes. How
would i resolve this? And, if a user is scrolled to the bottom of the
datagridview, when the data refreshes in the grid, the scrollbar
automatically goes back to the top. How would i prevent this from happening
so the user stays on the record they're viewing.
 
Ad

Advertisements

S

Scott M.

1. Is there a way to keep the datagridview datasource constantly bound to
a
sql db? So that as soon as a change takes place in the db by any user, it
is
updated on all screens. If so, how is that done? If not, what is the
best
practice to perform this type of function?
Not technically. But you could poll the data source repeatedly and often
(say every minute), but this could result in very poor performance and
create bottlenecks for other data access applications.

2. In refrence to above, I have a timer that refreshes the data every 3
minutes. One problem here is the screen flickers when it refreshes. How
would i resolve this? And, if a user is scrolled to the bottom of the
datagridview, when the data refreshes in the grid, the scrollbar
automatically goes back to the top. How would i prevent this from
happening
so the user stays on the record they're viewing.
Is this an ASP.NET Web Application? If so, turn the SmartNavigation
property of the DOCUMENT on.
 
G

Guest

I didn't think #1 would work. It never hurts to ask. The timer is set and
the data does refresh in the .net 2005 windows application. The two problems
I encounter here is a flicker on the screen during a data refresh and if the
user is at the bottom of the scroll, it automatically returns the scrollbar
to the top.
 
Ad

Advertisements


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

Top