private void AddUser_Load(object sender, System.EventArgs e)
{
//EmployeeClass j = new EmployeeClass();
// Now make and start the background thread.
Thread backgroundThread = new Thread(new ThreadStart(BindGrid));
backgroundThread.Start();

}
   public void BindGrid() 
{
Console.WriteLine("steve is ver good");
int total=0;
OleDbConnection  myConnection;
string myConnectionString="";
myConnectionString="Provider=MSDAORA; Data Source=openview; User ID=gdj; Password=gdjtest";
myConnection = new OleDbConnection(myConnectionString);
string myQuery ="select * from iptca_node" ;
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = new OleDbCommand(myQuery, myConnection);
DataSet ds = new DataSet();
adapter.Fill(ds,"user");
total=ds.Tables["user"].Rows.Count;
DataView Source=ds.Tables["user"].DefaultView;
myDataGrid.DataSource=Source;
myConnection.Close();

}
在创建线程时就直接调用 BindGrid方法嘛,干嘛那么复杂。