|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagridview Binding/Update QuestionI 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. > 1. Is there a way to keep the datagridview datasource constantly bound to Not technically. But you could poll the data source repeatedly and often > 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? (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 Is this an ASP.NET Web Application? If so, turn the SmartNavigation > 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. > property of the DOCUMENT on. 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. Show quote "Scott M." wrote: > > 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. > > > > Then see the second part of my earlier response.
Show quote "mkd1919" <mkd1***@discussions.microsoft.com> wrote in message news:9EDDD159-CD37-4A74-BE1A-03F432F241D7@microsoft.com... >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. > > "Scott M." wrote: > >> > 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. >> >> >> >> |
|||||||||||||||||||||||