怎样把DataGridView中做的数据改变会反映到它所绑定的DataTable里 DataGridView中做的数据改变会反映到它所绑定的DataTable里,最后使用SqlDataAdapter的Update方法,把修改反映到数据库中 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1.只要绑定了就会2.至于调用update方法 你只要指定了da相应的command即可或者自己写 或者使用commandBuilder来生成command。 for (int i = 0; i < dataGridView1.Rows.Count-1; i++) { dt.Rows[i].ItemArray[0] = dataGridView1.Rows[i].Cells[0].Value; dt.Rows[i].ItemArray[1] = dataGridView1.Rows[i].Cells[1].Value; dt.Rows[i].ItemArray[2] = dataGridView1.Rows[i].Cells[2].Value; dt.Rows[i].ItemArray[3] = dataGridView1.Rows[i].Cells[3].Value; } 我想了解了解this.Controls相关的,可是baidu不到,求帮 这句那有错误呢 create table 标准样库 as select * from 标准样 where 1=2 求一段正则表达式[[ 开头 ]]]]结尾 做过工作流中消息服务的高手请进 大写的Unicode字符如何转换成汉字(求C#源码) C#中经典的问题 我一直在想这个有没别的写法呢? 求一算法:数组相关 投票系统 求一个正则,字符串 请问怎样捕获其他窗口的按钮事件? C# 数据库中的数据导出为xls格式的数据
{
dt.Rows[i].ItemArray[0] = dataGridView1.Rows[i].Cells[0].Value;
dt.Rows[i].ItemArray[1] = dataGridView1.Rows[i].Cells[1].Value;
dt.Rows[i].ItemArray[2] = dataGridView1.Rows[i].Cells[2].Value;
dt.Rows[i].ItemArray[3] = dataGridView1.Rows[i].Cells[3].Value;
}