Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick
If e.RowIndex = -1 Then
Exit Sub
End If
If IsDBNull(DataGridView1.Rows.Item(e.RowIndex).Cells(0).Value) Then
MessageBox.Show("จะคลิกช่องว่างทำไม", "มั่วตลอด")
Else
textbox1.text = DataGridView1.Rows.Item(e.RowIndex).Cells(0).Value
textbox2.text = DataGridView1.Rows.Item(e.RowIndex).Cells(1).Value
textbox3.text = DataGridView1.Rows.Item(e.RowIndex).Cells(2).Value
textbox4.text = DataGridView1.Rows.Item(e.RowIndex).Cells(3).Value
textbox5.text = DataGridView1.Rows.Item(e.RowIndex).Cells(4).Value
End If
End Sub