T
Terry Olsen
I have two DataGridView's loaded from their respective datasources. I want
to highlight rows in one DataGridView that are also in the other
DataGridView. But the following code does not work. Looking for some
suggestions:
Private Sub ShowPlaylistSongsInLibraryGrid()
For i As Integer = 0 To gridLibrary.Rows.Count - 1
For j As Integer = 0 To gridPlaylist.Rows.Count - 1
If gridLibrary.Rows(i).Cells("FilePath").Value =
gridPlaylist.Rows(j).Cells("FilePath").Value Then
gridLibrary.Rows(i).DefaultCellStyle.BackColor = Color.Yellow
End If
Next
Next
End Sub
to highlight rows in one DataGridView that are also in the other
DataGridView. But the following code does not work. Looking for some
suggestions:
Private Sub ShowPlaylistSongsInLibraryGrid()
For i As Integer = 0 To gridLibrary.Rows.Count - 1
For j As Integer = 0 To gridPlaylist.Rows.Count - 1
If gridLibrary.Rows(i).Cells("FilePath").Value =
gridPlaylist.Rows(j).Cells("FilePath").Value Then
gridLibrary.Rows(i).DefaultCellStyle.BackColor = Color.Yellow
End If
Next
Next
End Sub