单击DataGridView时如何在DateTimePicker中显示日期?

时间:2019-03-27 10:52:33

标签: mysql vb.net datagridview datetimepicker

If e.RowIndex >= 0 Then
    Dim row As DataGridViewRow
    row = Me.DataGridView1.Rows(e.RowIndex)

    TextBox6.Text = row.Cells("ear_number").Value.ToString
    TextBox3.Text = row.Cells("location_of_pig").Value.ToString
    ComboBox3.Text = row.Cells("product_used").Value.ToString
    ComboBox1.Text = row.Cells("reason_for_treatment").Value.ToString
    TextBox4.Text = row.Cells("dose_course_of_treatment").Value.ToString
    TextBox2.Text = row.Cells("person_administering").Value.ToString
    DateTimePicker1.Text = row.Cells("treatment_date").Value.ToString
End If

0 个答案:

没有答案