//datagridview显示数据
this.bindingSource1.DataSource = sqlhelper.ExecuteDataSet("select * from table1").Tables[0];
this.dataGridView1.DataSource = bindingSource1;我想直接编辑datagridview,怎么无法更新到数据库?
this.bindingSource1.DataSource = sqlhelper.ExecuteDataSet("select * from table1").Tables[0];
this.dataGridView1.DataSource = bindingSource1;我想直接编辑datagridview,怎么无法更新到数据库?
查询数据放入DataSet中,ds
this.datagridview.datasource = ds.table[0].defaultview
就可以了嘛
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://feiyun0112.cnblogs.com/