Click here to Skip to main content
14,638,900 members
Rate this:
Please Sign up or sign in to vote.
See more:
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
Rate this:
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
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 2

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

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




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