最简单的DataGrid邦定
OleDbConnection aConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\wms.mdb");
OleDbDataAdapter da=new OleDbDataAdapter("select * from IN_PAGE",
aConnection);
DataSet ds =new DataSet();
da.Fill(ds,"IN_PAGE");
下面我发现
dataGrid1.SetDataBinding(ds,"IN_PAGE"); 和
this.dataGrid1.DataSource=ds.Tables["IN_PAGE"]; 都能实现绑定的效果,这两个语句有什么区别?