当前位置: 代码迷 >> ASP.NET >> DataGrid有自动分页? 如何用的,说说吗
  详细解决方案

DataGrid有自动分页? 如何用的,说说吗

热度:9557   发布时间:2013-02-26 00:00:00.0
DataGrid有自动分页?? 怎么用的,说说吗?

听说:DataGrid有自动分页??

  怎么用的,说说吗?
能说说吗,我也是刚学了几天:   DataGrid.
还不怎么了确,想问问???

多谢各位的帮忙,谢谢

------解决方案--------------------------------------------------------
http://www.cnblogs.com/huazi4995/archive/2006/12/30/608111
------解决方案--------------------------------------------------------
在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();
}
------解决方案--------------------------------------------------------
是这样写的吗?

------解决方案--------------------------------------------------------
private void dgGood_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
this.dgGood.CurrentPageIndex = e.NewPageIndex;
this.dgGood.DataSource =ds ;
this.dgGood.DataBind();
}
我是这样用的```
------解决方案--------------------------------------------------------
DataGrid没有自动分页的功能,必须自己写分页事件处理程序才行,否则分不了页

========================
www.webdiyer.com
------解决方案--------------------------------------------------------
datagird.autopage = true

in the event of pageindexchanged

datagrid.cruuentpageindex = e.newpageindex
  相关解决方案