Click here to Skip to main content
12,630,410 members (31,943 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# SQL DataGridView
Hello,
I have made a Window Service which is saving data from COM Port to a Database. I have made Windows Form with one Datagridview. My question is, how can i automatically update datagridview when there is any new data goes into a database. Thanks
Posted 12-Feb-13 20:42pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

use timer in your code, and add a flag accordingly. I also did it in my window app
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

At timer_Elapsed event you can query database and set datasource of datagridview
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100