【问题标题】:Edit selected datagrid row in new form以新形式编辑选定的数据网格行
【发布时间】:2013-04-06 19:51:36
【问题描述】:

在 C# 中,我有绑定到客户表的数据网格视图,我希望当用户双击网格中的选定行时,会出现绑定到客户表(包括文本框)的新表单,让用户修改数据并保存到分贝?

实际上我尝试了这段代码但没有工作!我尝试通过以下代码同步gridview的位置和我的编辑表单绑定源,但运行时没有任何反应!

edit_customerform editcustomer = new edit_customerform();
editcustomer.customersBindingSource.Position=this.customersBindingSource.Position; 
editcustomer.ShowDialog();

【问题讨论】:

  • 其实我试过这段代码,但没有工作!我尝试通过以下代码同步 griedview 的位置和我的编辑表单绑定源,但运行时没有任何反应! edit_customerform editcustomer = new edit_customerform();编辑customer.customersBindingSource.Position=this.customersBindingSource.Position; editcustomer.ShowDialog();

标签: c# data-binding gridview


【解决方案1】:

【讨论】:

  • 其实我试过这段代码,但没有工作!我尝试通过以下代码同步 griedview 的位置和我的编辑表单绑定源,但运行时没有任何反应! edit_customerform editcustomer = new edit_customerform(); editcustomer.customersBindingSource.Position=this.customersBindingSource.Positio‌​n; editcustomer.ShowDialog();
猜你喜欢
  • 2023-03-03
  • 2023-01-20
  • 2010-09-18
  • 2015-02-07
  • 2018-07-19
  • 1970-01-01
  • 1970-01-01
  • 2018-03-28
  • 2013-02-16
相关资源
最近更新 更多