Why method doesn't execute?

  • Thread starter Thread starter Vejrazib
  • Start date Start date
V

Vejrazib

Guest
Hello. I have a problem. Obviously ;)
So, I have a method that update and refresh datatable in one form. If I "connect" this method to button in same form (form1) it works fine, but if I "connect" it to a button in another form (Form2) same process doesnt work. does anybody know why?

Here is some code:

Form1:

public void RefreshTabel()
{
gTableAdapter.Update(ds.Growns);
this.gTableAdapter.Fill(this.ds.Growns);
}

Form 2:

private void buttonSave_Click(object sender, EventArgs e)
{
Form1 form1 = new Form1();
form1.RefreshTabel();
}



Thanks for help.

Continue reading...
 
Back
Top