Private Sub IssueDGV_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles IssueDGV.CellMouseClick
Dim row As DataGridViewRow = IssueDGV.Rows(e.RowIndex)
Bidlbl.Text = row.Cells(2).Value.ToString
Booktitlelbl.Text = row.Cells(3).Value.ToString
DateTimePicker1.Value = row.Cells(6).Value.ToString
If MainStudent.stdidTB.Text = "" Then
key = 0
Else
key = Convert.ToInt32(row.Cells(0).Value.ToString)
End If
End Sub
I want the code DateTimePicker1.Value = row.Cells(6).Value.ToString
to return the date to the datetimepicker but it returns the error in the title. May anyone assist with any relevant code or alternate way to approach the problem.