|
发表于 2020-1-2 20:24:01
|
显示全部楼层
在datagrid的PageIndexChanged事件里头写
例如
private void dgGood_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
if(Session["dgGoodsDS"]!=null)
ds =(ICollection)Session["dgGoodsDS"];
this.dgGood.CurrentPageIndex = e.NewPageIndex;
this.dgGood.DataSource =ds ;
this.dgGood.DataBind();
} |
|