当前位置: 代码迷 >> ASP.NET >> Gridview怎么给CommandField列增加Footer
  详细解决方案

Gridview怎么给CommandField列增加Footer

热度:4028   发布时间:2013-02-25 00:00:00.0
Gridview如何给CommandField列增加Footer
如题 增加的footer仍然是个按钮,用来添加时候确认用

------解决方案--------------------------------------------------------
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
Button x = new Button();
x.OnClientClick = "return confirm('ok')";
x.Text = "确认删除";
e.Row.Cells[0].Controls.Add(x);
}
}
  相关解决方案