GridView编辑资料行>加入资料行buttonField>设置好属性(可连接图片)
asp.net中用法
((ImageButton)e.Row.Cells[?].Controls[0]).Attributes.Add("onclick", "if(!window.confirm('Are you sure you want to delete this entry')) return;");
加载页面的时候删除不合条件的数据
点击只能按钮,启用删除即可
数据绑定时去判断,不合适的就删了。。