C# winform 在datagridview中选中行删除并同时删除ACCESS中的数据

单击 button删除
2024-12-04 01:31:58
推荐回答(2个)
回答1:

protected void gvRoomTypes_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType==DataControlRowType.DataRow)
{
//添加删除确认
ImageButton imgbtn = e.Row.FindControl("imgbtnDe") as ImageButton;
imgbtn.Attributes.Add("onclick", "return confirm('您确认要删除吗?');");
}
}

回答2:

http://hi.baidu.com/chenaran/blog/item/340d155843fa49262934f069.html
自己好好地看吧,好多方法随便选个就行。
祝您愉快!