【发布时间】:2013-06-24 10:49:35
【问题描述】:
大家好,我的功能编码如下更改并重新绑定 datagridview 这是我的代码
// Form1代码
public void UpDateData(DataTable dt)
{
dataGridView1.Refresh();
dataGridView1.DataSource = dt;
updateTextBoxes();
}
public void updateTextBoxes()
{
// Some caluculation based on the datagridview rows
}
Form2 按钮点击代码
private void button1_Click(object sender, EventArgs e)
{
// Some code to collect the changes made
Form1 f=new Form1();
f.UpDateData(dt);
this.close();
}
除了 updateTextBoxes 方法之外,一切都很好,这不是根据需要更新文本框,有人可以帮我吗
【问题讨论】: