【发布时间】:2017-06-16 20:51:38
【问题描述】:
我在 datagridview 中有一个 datetimepicker 值。 (到达日期和出发日期) 这里是屏幕截图。
另外,我有一个数据网格视图中的值的编辑表单。
如何将 datetimepicker 的值从 datagridview 传递到第二个表单作为 datetimepicker 值。
这是我的尝试:
private void arrivaldgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
edit edt = new edit();
edt.label12.Text = this.label2.Text;
edt.label13.Text = this.arrivaldgv.CurrentRow.Cells[0].Value.ToString();
edt.textBox1.Text = this.arrivaldgv.CurrentRow.Cells[1].Value.ToString();
edt.textBox2.Text = this.arrivaldgv.CurrentRow.Cells[2].Value.ToString();
edt.textBox3.Text = this.arrivaldgv.CurrentRow.Cells[3].Value.ToString();
/* edt.dateTimePicker1.Value = this.arrivaldgv.CurrentRow.Cells[4].Value; problem here */
edt.ShowDialog();
}
【问题讨论】:
标签: c# ms-access datagridview