Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Dim i As Integer i = DataGridView1.SelectedCells(0).RowIndex Me.TextBox6.Text = Me.DataGridView1.Rows(i).Cells(6).Value.ToString() Me.TextBox8.Text = Me.DataGridView1.Rows(i).Cells(8).Value.ToString() Me.RichTextBox1.Text = Me.DataGridView1.Rows(i).Cells(7).Value.ToString() Me.TextBox9.Text = Me.DataGridView1.Rows(i).Cells(9).Value.ToString() Me.DateTimePicker1.Value = Me.DataGridView1.Rows(i).Cells(2).Value() Me.DateTimePicker2.Value = Me.DataGridView1.Rows(i).Cells(3).Value() 'Me.DateTimePicker3.Value = Me.DataGridView1.Rows(i).Cells(4).Value() 'Me.DateTimePicker4.Value = Me.DataGridView1.Rows(i).Cells(5).Value() If Me.DataGridView1.Rows(i).Cells(10).Value.ToString() = RadioButton1.Text Then Me.RadioButton1.Checked = True ElseIf Me.DataGridView1.Rows(i).Cells(10).Value.ToString() = RadioButton2.Text Then Me.RadioButton2.Checked = True ElseIf Me.DataGridView1.Rows(i).Cells(10).Value.ToString() = RadioButton3.Text Then Me.RadioButton3.Checked = True End If End Sub
if Me.DataGridView1.Rows(i).Cells(5).Value is dbnull then msgbox(".....") else Me.DateTimePicker4.text = Me.DataGridView1.Rows(i).Cells(5).Value() end if
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)