AutoPaging=true
this.MyDataGrid.CurrentPageIndex=e.NewPageIndex;
 this.MyDataGrid.DataBind();
所有的例程都是这样的!

解决方案 »

  1.   

    DataGrid控件的分页还是很简单的.只需:
    allowpaging="true"
    pagesize=13
    pagerstyle-mode=numericpages
    onpageindexchanged="changepage"然后再定义"changepage"函数
    private void changepage(Object obj,DataGridPageChangedEventArgs e)
    {
      grid1.CurrentPageIndex=e.NewPageIndex;
      Dataload("");
    }
      

  2.   

    see
    Build a Variety of Custom Controls Based on the DataGrid Control 
    http://msdn.microsoft.com/msdnmag/issues/01/10/cutting/cutting0110.aspServer-side ASP .NET Data Binding, Part 2: Customizing the DataGrid Control 
    http://msdn.microsoft.com/msdnmag/issues/01/04/cutting/cutting0104.aspLogical Navigation
    Walk through a DataGrid Using Variable-length Pages 
    http://www.aspnetpro.com/features/2002/06/asp200206de_f/asp200206de_f.asp