直接设我没试过,我以前的做法是两个tr,上tr存页数下面存gridview===================================================================
中国DotNet程序员俱乐部 -- www.willsft.com -- 中国最专业的DotNet技术社区!
===================================================================

解决方案 »

  1.   

    参考这断代码: 
    GridView1.Caption = "一共有" + dsResult.Tables[0].Rows.Count + "条资讯, 当前第" + (GridView1.PageIndex + 1) + "页";
    dsResult是你绑定的结果集.
    我想你应该能看明白吧
      

  2.   

    protected void gvdiseases_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowIndex >= 0)
            {
                         
                  int i = e.Row.RowIndex + 1 +(gvdiseases.PageIndex)*10;
                  Label lb = (Label)e.Row.FindControl("lbshow");
                  lb.Text = i.ToString();        
                
               
            }
        }
      

  3.   

    private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
            {
                Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
                  e.RowBounds.Location.Y,
                  this.dataGridView1.RowHeadersWidth,
                  e.RowBounds.Height);            TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1+"/"+dataGridView1.Rows.Count).ToString(),
                    this.dataGridView1.RowHeadersDefaultCellStyle.Font,
                    rectangle,
                    this.dataGridView1.RowHeadersDefaultCellStyle.ForeColor,
                    TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter);
            }==========================================================================
    这个是可以的