How make Form2 with progressBar in other thread, while downloading data in datagridview in Form1?
-
Hi!I have event, which when clicked begin downloading data in datagridview. I make so,but is wrong.Form2 must be in other thread.How make right?
private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
string path = "test.xml";
DataSet ds = new DataSet();
ds.ReadXml(path);
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "table1";
frm.Close();
}Sorry for my english and thanks for advance.
-
Hi!I have event, which when clicked begin downloading data in datagridview. I make so,but is wrong.Form2 must be in other thread.How make right?
private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
string path = "test.xml";
DataSet ds = new DataSet();
ds.ReadXml(path);
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "table1";
frm.Close();
}Sorry for my english and thanks for advance.