2 abc12326113 abc12326113 于 2014.11.28 11:00 提问

bindingNavigator1可以导航多个dataGridView吗

private void button1_Click(object sender, EventArgs e)
{

BindingSource bindingSource1 = new BindingSource();
bindingSource1.DataSource = ds2 ;//存储了多个表
bindingNavigator1.BindingSource = bindingSource1;
//bindingSource1.DataMember = ds2.Tables[x].TableName;
dataGridView1.DataSource = bindingSource1.**;// ds2.Tables[X];显示ds2的第X个表
//bindingSource1.DataMember = ds2.Tables[Y].TableName;
dataGridView2.DataSource = bindingSource1.**;// ds2.Tables[Y];显示ds2的第Y个表
//bindingSource1.DataMember = ds2.Tables[Z].TableName;
dataGridView3.DataSource = bindingSource1.**;//ds2.Tables[Z];显示ds2的第Z个表
}
可以实现bindingNavigator1同步导航多个dataGridView显示的表吗,比如:点”移动到上一条“时,几个dataGridView中的表同时移动。或都是其它可以方案也行,比如把这几个表拼接到一个表中

Csdn user default icon
上传中...
上传图片
插入图片