c#中bindingNavigator的用法是什么,求示范……
的有关信息介绍如下:在界面上放入bindingNavigator1,dataGridView1,button1,button2,textBox1控件,加入引用using System.Data.OracleClient; 没有就自己添加引用 private BindingSource myBindingSource = new BindingSource(); OracleConnection conn = new OracleConnection("Data Source=xxx;Persist Security Info=True;User ID=xxx;Password=xxx"); private void Form1_Load(object sender, EventArgs e) { string sql3 = "select * from xxxx "; OracleCommand cmd3 = new OracleCommand(sql3, conn); OracleDataAdapter oda = new OracleDataAdapter(cmd3); DataSet ds = new DataSet(); oda.Fill(ds); myBindingSource.DataSource = ds.Tables[0]; //绑定数据源 this.bindingNavigator1.BindingSource = myBindingSource; //数据源跟bindingNavigator1控件相连 this.dataGridView1.DataSource = myBindingSource; //数据源跟dataGridView1控件相连this.textBox1.DataBindings.Add("Text", myBindingSource, "IP");//数据源跟textBox1控件相连} private void button1_Click(object sender, EventArgs e) { myBindingSource.MoveNext(); } private void button2_Click(object sender, EventArgs e) { myBindingSource.MovePrevious(); }