如何移动指针?包括:到头,到尾,下一个,上一个
我下面的代码已能正常运行:成功地取到数据并显示于网格和文本框控件中我想另放四个按钮,用来移动记录指钍,通过这四个按钮,我要能在文本框中显示第一个最后一个上一个下一个记录行的内容.
请朋友们帮忙!void Button1Click(object sender, EventArgs e)
{
this.sqlConnection1=new System.Data.SqlClient.SqlConnection();
this.sqlConnection1.ConnectionString="data source=(local);initial catalog=test2;UID=sa;PWD=nevertell";
string select="select * from problempool";
System.Data.SqlClient.SqlCommand cmd=new System.Data.SqlClient.SqlCommand(select,sqlConnection1 );
System.Data.SqlClient.SqlDataAdapter da=new System.Data.SqlClient.SqlDataAdapter("select * from problempool",sqlConnection1 );
System.Data.DataSet ds=new System.Data.DataSet();
da.Fill(ds,"problempool");
dataGrid1.SetDataBinding(ds,"problempool");

textBox1.DataBindings.Add("Text",ds,"Problempool.ChoiceA"); //this.Text="Hello";
//button1.Text="hello";
//label1.Text="This is the text";

}