绑定数据在线程中
private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
if (DialogResult.OK == MessageBox.Show("是否要修改", "", MessageBoxButtons.OKCancel))
{
Thread thread = new Thread(DoWork);
thread.Start();
}
public delegate void MyInvoke();
public void DoWork()
{
MyInvoke mi = new MyInvoke(LoadData);
this.BeginInvoke(mi);
}
转载于:https://www.cnblogs.com/BillBlog/p/5032634.html