Datagridview Changes

windoz

Member
Joined
Apr 7, 2022
Messages
6
Programming Experience
1-3
Hi,

I'm currently using VB.net 2019 and have a program which contains a datagridview. The purpose of the datagridview is to load the .csv file every 5 mintues and the datagridview is updated to reflect any changes.

For example

Data imported
Name Checked Date Time Timestamp
John Pallet 123 28/04/2022 08:10 28/04/2022 08:10
Joe Pallet 149 28/04/2022 06:30 28/04/2022 06:30
Alfred Pallet 22 27/04/2022 22:30 28/04/2022 22:30
Sam Pallet 55 27/04/2022 18:45 27/04/2022 18:45

After 5 minutes the .csv now has 2 additional rows, Alison and Betty.
Name Checked Date Time Timestamp
Alison Pallet 12 28/04/2022 11:30 28/04/2022 11:30
Betty Pallet 99 28/04/2022 10:30 28/04/2022 10:30
John Pallet 123 28/04/2022 08:10 28/04/2022 08:10
Joe Pallet 149 28/04/2022 06:30 28/04/2022 06:30
Alfred Pallet 22 27/04/2022 22:30 28/04/2022 22:30
Sam Pallet 55 27/04/2022 18:45 27/04/2022 18:45

How do I detect any new additions that are loaded into my datagridview and create a popup message alert for the 2 new additions which will show Alison and Betty ?

After 5 minutes again the .csv now has 1 additional row, George.
Name Checked Date Time Timestamp
George Pallet34 28/04/2022 13:05 28/04/2022 13:05
Alison Pallet 12 28/04/2022 11:30 28/04/2022 11:30
Betty Pallet 99 28/04/2022 10:30 28/04/2022 10:30
John Pallet 123 28/04/2022 08:10 28/04/2022 08:10
Joe Pallet 149 28/04/2022 06:30 28/04/2022 06:30
Alfred Pallet 22 27/04/2022 22:30 28/04/2022 22:30
Sam Pallet 55 27/04/2022 18:45 27/04/2022 18:45

How do I detect this new addition and create a popup message alert for the 1 new addition which will show George ?

Any help or direction would be appreciated.
 
The grid should be irrelevant. You should be loading the data into some data source and binding that to the grid and it is the data source that you should be working with. How you load the data into that data source will determine how you determine whether the data has changed.
 

Latest posts

Back
Top