我有一个奇怪的问题。 例如,我在B栏中装上了10个浏览器的卷宗,其中一排长,有时在数据GridView中并未装上全线。 另一些人认为,前哨的卷宗装上了整座或没有。
你们是否知道为什么?
我希望我对此作了很好的解释。 Sorry my Poor english.
Thanks
EDIT:
Here is my code to load the dataGridView:
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D: est.xls;Extended Properties=""Excel 8.0;HDR=YES;""";
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.OleDb");
DbDataAdapter adapter = factory.CreateDataAdapter();
DbCommand selectCommand = factory.CreateCommand();
selectCommand.CommandText = "SELECT * FROM [sheet1$]";
DbConnection connection = factory.CreateConnection();
connection.ConnectionString = connectionString;
selectCommand.Connection = connection;
adapter.SelectCommand = selectCommand;
data = new DataSet();
adapter.Fill(data);
dataGridView1.DataSource = data.Tables[0].DefaultView;