数据绑定后gridview显示正常,用自带分页,翻页时出错!
1个回答
展开全部
请添加GridView的分页事件OnPageIndexChanging
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
//e.NewPageIndex很关键
this.GridView1.PageIndex = e.NewPageIndex;
//添加你自己的绑定函数如:
DataBinding();
}
Good Luck bro!
I am Radeon Ling
La Vie en Rose
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
//e.NewPageIndex很关键
this.GridView1.PageIndex = e.NewPageIndex;
//添加你自己的绑定函数如:
DataBinding();
}
Good Luck bro!
I am Radeon Ling
La Vie en Rose
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询