怎样将一个Datagridview和几个textbox绑定到一个表上呢?
dataGridView1.DataSource = ds.Tables[0];
dataGridView1.DataSource = ds.Tables[0].DefaultView;
textBox1.DataBindings.Add(new Binding( "text ",ds, "aa.uid "));
textBox2.DataBindings.Add(new Binding( "text ", ds, "aa.pwd "));
mybin = this.BindingContext[ds, "aa "];
这么做了之后dataGridView1绑定就失效了,这是怎么回事呢?
要几个同时绑定怎么做呢?
------解决方案--------------------既然是DataGridView,那应该是.net 2.0吧?
2.0时最好用BindingSource.