1个回答
展开全部
在GridView的RowCreate事件进行处理
protected void GvProduct_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
TableCellCollection tcHeader = e.Row.Cells; //获取脚模板中的所有列
tcHeader.Clear();
tcHeader.Add(new TableCell());
tcHeader[0].ColumnSpan=4;//跨4列
tcHeader[0].Attributes.Add("align","center");
HtmlGenericControl div = (HtmlGenericControl)this.Page.FindControl("fep");
tcHeader[0].Controls.Add(div);
}
}
protected void GvProduct_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
TableCellCollection tcHeader = e.Row.Cells; //获取脚模板中的所有列
tcHeader.Clear();
tcHeader.Add(new TableCell());
tcHeader[0].ColumnSpan=4;//跨4列
tcHeader[0].Attributes.Add("align","center");
HtmlGenericControl div = (HtmlGenericControl)this.Page.FindControl("fep");
tcHeader[0].Controls.Add(div);
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询