I had a lot of forums searching for this question, but unfortunately I didn’t find anything worthwhile.

From the newZakaz child form, caused a Grid update.

I did it in different ways, like this:

Dispether disp = new Dispether disp.заказыTableAdapter.Fill(taxi_DataSet.Заказы); 

заказыTableAdapter и taxi_DataSet naturally public , but alas, they don’t want to be updated.

Tell the good people how to still update this DataGridView.

  • I answer my own question. Just put on the parent form the form activation handler private void Dispetcher_Activated (object sender, EventArgs e) {this. } - Sharp

1 answer 1

Changing the other form is as follows:

 Form2 testDialog2 = new Form2(); testDialog2.Text = "Редактирование записи"; 

As for updating the grid, here I can give my example of my code:

 OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:/BD.mdb"); OleDbCommand com = new OleDbCommand(); OleDbDataAdapter adap = new OleDbDataAdapter(); DataTable dt = new DataTable(); public void Form1_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); com.Connection = conn; com.CommandText = "Select * from "+comboBox1.Text; conn.Open(); adap.SelectCommand = com; adap.Fill(ds); dt = ds.Tables[0]; dataGridView1.DataSource = dt; conn.Close(); } 

Calling Form1_Load is updating the grid.