
新手第一次發求助帖沒有多少分希望大家幫一下忙程式是這樣的:
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
textBox1.Text = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["名稱"].Value.ToString();
textBox2.Text = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["入庫單號"].Value.ToString();
textBox3.Text = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["數量"].Value.ToString();
textBox4.Text = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["單價"].Value.ToString();
dateTimePicker1.Value = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["name"].Value.ToString();
textBox6.Text = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["供應商名稱"].Value.ToString();
}
里面有錯誤希望有大神幫忙一下,萬分感謝
uj5u.com熱心網友回復:
dateTimePicker1.Value = DateTime .Parse(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["name"].Value.ToString())轉載請註明出處,本文鏈接:https://www.uj5u.com/net/44668.html
標籤:C#
