Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Why method doesn't execute?

$
0
0

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 doesn't 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.


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>