(50分)用access作了个视图查询,把它通过bindingsource绑定到datagridview上,datagridview上显示不出数据来?
代码如下,
private void Boundary1_Load(object sender, EventArgs e)
{
this.view_DifferentTableAdapter.Connection.ConnectionString = _connectStr;
this.view_DifferentTableAdapter.Fill(this.boundaryDataSet.view_Different);
int i = this.boundaryDataSet.view_Different.Count;
int j = this.view_DifferentBindingSource.List.Count;
int k = this.view_DifferentDataGridView.RowCount;
this.view_DifferentDataGridView.Refresh();
}
经跟踪查看数据:i,j,k均有值为2,说明查询有数据,就是在datagridview上显示不出来。
------解决方案--------------------你把完整的代码写出来
------解决方案--------------------datagridview.DataSource =this.boundaryDataSet.view_Different;
datagridview.DataBind();