我想将数据移动到另一种形式,但是那里的文本框有错误。我已经尝试了很多次
payment pym = new payment();
pym.textBox4.Text = dataGridView1.CurrentRow.Cells[7].Value.ToString();
pym.textBox5.Text = dataGridView1.CurrentRow.Cells[8].Value.ToString();
pym.textBox6.Text = dataGridView1.CurrentRow.Cells[9].Value.ToString();
pym.textBox7.Text = dataGridView1.CurrentRow.Cells[10].Value.ToString();
pym.ShowDialog();
答案 0 :(得分:0)
将其写入付款表格
public void GetText4(string txt) => textBox4.Text = txt;
并将其称为表单:
payment pym = new payment();
pym.GetText4(dataGridView1.CurrentRow.Cells[7].Value.ToString());
pym.ShowDialog(this);