这样试试int Record=0;
txtCategoryName.text=SqlDatSet.Tables["Categories"].Rows[Record] 
   [2].ToString();
在点击后Record+=1;

解决方案 »

  1.   

    应该是控制DATASET对象的指针指向下一条记录!与TEXT控件本身无关吧!
      

  2.   

    to:thinkingforever(盼星星)
      这样就和不绑定一样了。to:2thaugust(2thaugust) 
     我用了
     txtCategoryName.BindingContext[SqlDatSet,"Categories"].Position+=1;这样也不行。麻烦大家再帮帮忙
      

  3.   

    BindingContext对象的position属性加一
      

  4.   

    先谢谢楼上的,可是我试过也不行啊。
    txtCategoryName.BindingContext[SqlDatSet,"Categories"].Position+=1;请问可不可以给一个比较全的代码。谢谢!!!
      

  5.   

    [C#] 
    private void BindControls()
    {
       BindingContext bcG1 = new BindingContext();
       BindingContext bcG2 = new BindingContext();   groupBox1.BindingContext = bcG1;
       groupBox2.BindingContext = bcG2;   textBox1.DataBindings.Add("Text", ds, "Customers.CustName");
       textBox2.DataBindings.Add("Text", ds, "Customers.CustName");
    }private void Button1_Click(object sender, EventArgs e)
    {
       groupBox1.BindingContext[ds, "Customers"].Position += 1;         
    }private void Button2_Click(object sender, EventArgs e)
    {
       groupBox2.BindingContext[ds, "Customers"].Position += 1;
    }
      

  6.   

    谢谢,已经搞定了。不过我发现用
    this.BindingContext = bcG1;更好点。再次谢谢!!!