G
Guest
Hi,
I am having issue w/ threading. I have a datagrid and I want to run
FillDG() in different thread and once it finishes, I want to bind the data.
private void button1_Click(object sender, System.EventArgs e)
{
Thread t = new Thread(new ThreadStart(FillDG));
t.Start();
// I don't know what to put here to wait for t to finish
// I tried t.Join(); but this locked up the win form, i.e. I can't move the
form around
myDataGrid.SetDataBinding(myDataSet, "myDataTable");
}
Please advice, thanks!
-P
I am having issue w/ threading. I have a datagrid and I want to run
FillDG() in different thread and once it finishes, I want to bind the data.
private void button1_Click(object sender, System.EventArgs e)
{
Thread t = new Thread(new ThreadStart(FillDG));
t.Start();
// I don't know what to put here to wait for t to finish
// I tried t.Join(); but this locked up the win form, i.e. I can't move the
form around
myDataGrid.SetDataBinding(myDataSet, "myDataTable");
}
Please advice, thanks!
-P