当我尝试时,
GridView.PageSize = 5;
GridView.AllowPaging = true;
GridView.PageIndexChanging += new GridViewPageEventHandler(GridView_PageIndexChanging);
我得到了这个,
void GridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
if (GridView != null)
{
GridView.PageIndex = e.NewPageIndex;
GridView.DataBind();
}
}
为什么我根本看不到页码,我 100% 确定有超过 5 行,因为当我增加 pageSize 属性时,我可以看到它们。