编辑更新删除datagridview [英] edit update delete datagridview
本文介绍了编辑更新删除datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从DataGridView控件中编辑和删除数据
编辑和删除按钮放置在datagriview中cntol
How can edit and delete data from DataGridView control
edit and delete buttons are placed in the datagriview cntol
推荐答案
检查以下内容:
在ASP.NET中的DataGrid中编辑和删除多个数据 [使用分页在DataGridView中添加,编辑和删除 [
check these out:
Edit and Delete multiple Data in DataGrid in ASP.NET[^]
Add, Edit, and Delete in DataGridView with Paging[^]
hope it helps :)
使用具有Update,Insert,Delete查询的表适配器.
并按照下面的示例传递参数.
use Table adapter that have Update,Insert,Delete query.
and pass argument as in below example.
yourTableAdapter.Update(yourDataSet.TableName);
更新按钮事件
Update Button Event
private void button2_Click(object sender, EventArgs e)
{
try
{
requesterTableAdapter.Update(requesterFileInventoryDataSet.Requester);
MessageBox.Show("Record Updated", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show("Some Error in Update", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
这篇关于编辑更新删除datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文