首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

Gridview怎么给CommandField列增加Footer

2012-04-11 
Gridview如何给CommandField列增加Footer如题 增加的footer仍然是个按钮,用来添加时候确认用[解决办法]pro

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);
}
}

热点排行