DataGridView更新数据库不完全 datagridview数据库 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 断点看一下adapter.Update(dataset.Tables[0]);这句Tables[0]中的数据 保存前调用dataGridView.EndEdit(); 妹的好了一会儿又不行了,楼上两位的都试过了还是不行啊private void tsMenuSave_Click(object sender, EventArgs e) { DialogResult dialogRes = MessageBox.Show("Are you sure to save these data?","Confirm", MessageBoxButtons.YesNo,MessageBoxIcon.Question); if (dialogRes == DialogResult.Yes) { dataGridView1.EndEdit(); dataGridView1.ClearSelection(); this.Focus(); dbOperation.update(); } }EndEdit(); ClearSelection(); Focus(); 都试了个遍还是不行啊。。 datagridview数据源最好用BindingSource保存的时候调用 bindingSource.EndEdit()应该是可以的 BindingSource怎么用啊,网上搜半天看不怎么明白,能给个例子么,或者简单讲一下,谢谢 BindingSource bindingSource = new BindingSource();dataGridView1.DataSource = bindingSource;bingingSorce.DataSource = dbOperation.showData();保存时调用 bindingSource .EndEdit(); 除了 dataGridView1.EndEdit(); 还有没有dataGridView1.Update。? 如何应用GPRS TcpClient异步第一次连接服务器后,在向服务器发送消息失效. C#做报表 请问如何检测计算机上是否已安装了 autocad? 请问C#中,事件处理例程是如何打断正常执行的程序流的? 怎么在C#是取得Ipicture接口交换图像 C#的声音播放 请各位交出MSN:) 谁能告诉我com组件、api函数与.net组件间有什么联系吗? 分本来自论坛,也应散到论坛中去. WEB网页能获取客户端机器哪些硬件信息 C#工程不需要编译,直接打包成安装exe文件
private void tsMenuSave_Click(object sender, EventArgs e)
{
DialogResult dialogRes = MessageBox.Show("Are you sure to save these data?","Confirm",
MessageBoxButtons.YesNo,MessageBoxIcon.Question); if (dialogRes == DialogResult.Yes)
{
dataGridView1.EndEdit();
dataGridView1.ClearSelection();
this.Focus();
dbOperation.update();
}
}
EndEdit(); ClearSelection(); Focus(); 都试了个遍还是不行啊。。
保存的时候调用 bindingSource.EndEdit()应该是可以的
bingingSorce.DataSource = dbOperation.showData();保存时调用 bindingSource .EndEdit();