Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
Dim index As String = e.RowIndex
Dim i As Integer = 0
If index >= 0 Then
While i < 13
DataGridView1.Rows(e.RowIndex).Cells(i).Style.BackColor = Color.Gray
If tb.Text <> "" Then
DataGridView1.Rows(tb.Text).Cells(i).Style.BackColor = Color.White
End If
i = i + 1
End While
tb.Text = e.RowIndex
de.Text = DataGridView1.Rows(tb.Text).Cells(0).Value.ToString
End If
End Sub