标签:
先设置showfooter属性为true 再写一下代码
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
// 合计
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[0].Text = "合计";
e.Row.Cells[1].Text = GridView1.Rows.Count.ToString()+"条数据";
}
}
标签:
原文地址:http://www.cnblogs.com/happychen/p/5138571.html