Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGridView Updating

Status
Not open for further replies.

ehenry

Programmer
Sep 18, 2009
65
0
0
US
I have an application that links a datagridview to a table on a SQL Server Database. I have it set to refresh every 15 seconds. I was wondering if anyone knew of a way to check if the new values coming in were different than the values already there. The reason I ask is because I want to make cells with values that have changed to be highlighted for a second. Would this be done in the datagridview.cellpainting event?? Any help would be appreciated. Thank you.
 
I'm not sure of a way to do directly what you've asked but I wonder if there may be an alternative method of accomplishing what you want using the database. For example, when a record/value is changed in the database, setting a flag on that record (RecordChanged?) to true. Then, immediately following when the refresh on your application takes place, setting that same flag back to false.

Just something to consider instead of trying to do all of the work on the front-end or having to create a bunch of values for comparative purposes when it may be somewhat easier on the database side.

------------------------------------------------------------------------------------------------------------------------
Reason and free inquiry are the only effectual agents against error; they are the natural enemies of error and of error only.

Thomas Jefferson

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top