Hi,
I have two DataGridView1 and DataGridView2 which is having same columns and rows.
How to compare between two grids.
I wrote the for loop but no success.
below is the code.
For Each rw1 As DataGridViewRow In DataGridView1.Rows
For Each rw2 As DataGridViewRow In DataGridView2.Rows
If rw1.Cells(3).Value <> rw2.Cells(3).Value Then
If Not rw1.Cells(3).Value Is Nothing Then
rw1.Cells(3).Style.BackColor = Color.Red
End If
End If
Next
Next
Thanks
Basit

Jignesh KumarRank #91 · 22.9K reputationPosted Mar 24, 2019, 2:42 AM EDT
Gajendra JangidRank #157 · 14.9K reputationPosted Mar 25, 2019, 8:51 PM EDT