private void but_back_Click(object sender, System.EventArgs e)
{
this.BindingContext[this.myDS,"KJ_AWARD_BASIC"].Position --;
} private void but_next_Click(object sender, System.EventArgs e)
{
this.BindingContext[this.myDS,"KJ_AWARD_BASIC"].Position ++;
}
这样就行了,myDS是DataSet变量,用DataAdapter填充过。

解决方案 »

  1.   

    private DataSet dsCustomer=new DataSet();
    private int iCurRowIndex=0;
    private void MoveToNextorPrevious(int iMovetype)
    {
    if(iMovetype == 0)//下一条
    {
            if(iCurRowIndex < ds.Tables[0].Rows.Count) iCurRowIndex++;
    }
    else if(iMovetype == 1)//上一条
    {
    if(iCurRowIndex > 0)iCurRowIndex--;
    }
    this.txtCust_Name.Text = dsCustomer.Tables[0].Rows[iCurRowIndex]["name"].ToString();
    this.txtCust_Address.Text = dsCustomer.Tables[0].Rows[iCurRowIndex]["address"].ToString();
    }
      

  2.   

    这还不够详细啊?不行你还是再看看QuickStart吧