http://xml.sz.luohuedu.net/xml/ShowDetail.asp?id=B12283DE-DB20-4322-ACCC-12724442808A
你可以看一看这个例子。
至于你说的显示当前记录的某个字段的值,
int row=Convert.ToInt32 (this.dgrStudent.CurrentPageIndex)*this.dgrStudent.PageSize+Convert.ToInt32(e.Item.ItemIndex );
TextBox.Text = ds.Table[0].Row[row]["字段名"];

解决方案 »

  1.   

    //"尾记录"按钮对应的事件
    protected void GoLast ( object sender , System.EventArgs e )
    {
    myBind.Position = myBind.Count - 1 ;
    }
    //"下一条"按钮对应的事件
    protected void GoNext ( object sender , System.EventArgs e )
    {
    if ( myBind.Position == myBind.Count - 1 )
    MessageBox.Show ( "已经到尾记录!" ) ;
    else
    myBind.Position += 1 ;
    }
    //"上一条"按钮对应的事件
    protected void GoPrevious ( object sender , System.EventArgs e )
    {
    if ( myBind.Position == 0 )
    MessageBox.Show ( "已经到首记录!" ) ;
    else
    myBind.Position -= 1 ;
    }
    //"首记录"按钮对应的事件
    protected void GoFirst ( object sender , System.EventArgs e )
    {
    myBind.Position = 0 ;
    }
    }
      

  2.   

    DataGrid1.UnSelect(DataGrid1.CurrectRowIndex);
    DataGrid1.CurrectRowIndex-=1;
    DataGrid1.Select(DataGrid1.CurrectRowIndex);