Private Sub drugDGV_CellMouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles drugDGV.CellMouseUp
TabControl1.SelectedIndex = 0
If e.RowIndex <> -1 Then
With drugDGV
d_noTextBox.Text = .Rows.Item(e.RowIndex).Cells(1).Value.ToString()
d_instituteTextBox.Text = .Rows.Item(e.RowIndex).Cells(3).Value.ToString()
d_bookinTextBox.Text = .Rows.Item(e.RowIndex).Cells(4).Value.ToString()
d_dateDTPK.Value = .Rows.Item(e.RowIndex).Cells(2).Value.ToString()
d_bookdateDTPK.Value = .Rows.Item(e.RowIndex).Cells(5).Value.ToString()
End With
End If
End Sub