Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
frmDisplayLockerInfo.Show()
frmDisplayLockerInfo.TextBox2.ReadOnly = False
frmDisplayLockerInfo.TextBox3.ReadOnly = False
frmDisplayLockerInfo.TextBox4.ReadOnly = False
frmDisplayLockerInfo.TextBox5.ReadOnly = False
frmDisplayLockerInfo.TextBox6.ReadOnly = False
frmDisplayLockerInfo.TextBox7.ReadOnly = False
frmDisplayLockerInfo.TextBox8.ReadOnly = False
frmDisplayLockerInfo.TextBox9.ReadOnly = False
frmDisplayLockerInfo.TextBox10.ReadOnly = False
frmDisplayLockerInfo.TextBox11.ReadOnly = False
frmDisplayLockerInfo.TextBox12.ReadOnly = False
frmDisplayLockerInfo.TextBox13.ReadOnly = False
frmDisplayLockerInfo.TextBox15.ReadOnly = False
frmDisplayLockerInfo.TextBox14.ReadOnly = False
Dim i As Integer
Dim ds As New DataSet
i = DataGridView1.CurrentRow.Index
Label1.Text = i
frmDisplayLockerInfo.TextBox1.Text = DataGridView1.Item(0, i).Value
frmDisplayLockerInfo.TextBox13.Text = DataGridView1.Item(1, i).Value
frmDisplayLockerInfo.TextBox15.Text = DataGridView1.Item(2, i).Value
frmDisplayLockerInfo.TextBox12.Text = DataGridView1.Item(3, i).Value
frmDisplayLockerInfo.TextBox2.Text = DataGridView1.Item(4, i).Value
frmDisplayLockerInfo.TextBox3.Text = DataGridView1.Item(5, i).Value
'Dim DS As New DataSet
'If DS.Tables("Locker").Rows(0).Item(6) Is DBNull.Value Then
'frmDisplayLockerInfo.TextBox4.Text = If(IsDBNull(6), String.Empty, CType(6, String))
'Else
'frmDisplayLockerInfo.TextBox4.Text = SafeValue()
'frmDisplayLockerInfo.TextBox4.Text = DataGridView1.Item(6, i).Value
'End If
**If ds.Tables("Locker").Rows(0).Item(6).Equals(System.DBNull.Value) Then
frmDisplayLockerInfo.TextBox4.Text = DataGridView1.Item(6, i).Value
'Else
' frmDisplayLockerInfo.TextBox4.Text = DataGridView1.Item(6, i).Value
End If**
frmDisplayLockerInfo.TextBox5.Text = DataGridView1.Item(7, i).Value
frmDisplayLockerInfo.TextBox6.Text = DataGridView1.Item(8, i).Value
frmDisplayLockerInfo.TextBox7.Text = DataGridView1.Item(9, i).Value
frmDisplayLockerInfo.TextBox8.Text = DataGridView1.Item(10, i).Value
frmDisplayLockerInfo.TextBox9.Text = DataGridView1.Item(11, i).Value
frmDisplayLockerInfo.TextBox10.Text = DataGridView1.Item(12, i).Value
frmDisplayLockerInfo.TextBox11.Text = DataGridView1.Item(13, i).Value
frmDisplayLockerInfo.TextBox14.Text = DataGridView1.Item(14, i).Value
End Sub
End Class