I have to forms.
First has datagridview with BindingList<CustomObject> as DataSource.
Second should add/remove/update DataSource from the first form.
How can I do this? Modifying etc is happening in button_Click(object sender, EventArgs e) on secondform. I could pass BindignList<> by ref to SecondForms() constructor, but I can’t pass it further to button_Click()
What you can do is create an event in form2 that form1 will subscribe to. Keeping things sort of separate.
I don’t know how you have structured Form1 and Form2 so I will just give an example.
You will have to create a NotifySubsubscriberEventHandler delegate.
Here:
http://www.akadia.com/services/dotnet_delegates_and_events.html#Simple%20Event
But you already say you are passing BindingList into a constructor I assume like this:
Does the above not work? ^^