对gridview实在是不熟悉,网上有些代码,可用那种方法就不能使用排序了。我想使用页导航来做个假的双标题。在aspx里已经写<PagerSettings Position="TopAndBottom" />了。在.cs里
protected void GV_pcqk_query_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Pager)
{
//TableCell TC = (TableCell)e.Row.Cells;
TableCell TC = (TableCell)e.Row.Cells[0];
TC.Controls.Clear();
TC.ColumnSpan=3;
TC.Controls.Add(new LiteralControl("合计"));
e.Row.Controls.Add(TC);
}
}
可是页面上就是不显示。请问谁有更好的办法,要是能实现表头固定就更好了。最好有gridview的例子。
protected void GV_pcqk_query_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Pager)
{
//TableCell TC = (TableCell)e.Row.Cells;
TableCell TC = (TableCell)e.Row.Cells[0];
TC.Controls.Clear();
TC.ColumnSpan=3;
TC.Controls.Add(new LiteralControl("合计"));
e.Row.Controls.Add(TC);
}
}
可是页面上就是不显示。请问谁有更好的办法,要是能实现表头固定就更好了。最好有gridview的例子。
这个可能对大家有用,可对我没用,我要做的表格太大了,这么改得累死我