Sharing a CurrencyManager between 2 Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to allow 2 different forms to have access the same
CurrencyManager... I want to be able to scroll in one form and the other to
remain in sync.

I already pass the DataSet through to all the forms but requesting the
CurrencyManager in each results in a new instance.
 
I would have the first form generate / raise an event with the data /
information that would be display. Then the second form or anything for that
matter would listen for those events and act appropriately.
 
The reason I want to use the currency manager is to make sure everything
stays in sync without manual intervention, events syncing etc.
 
Hi Charlie,

If you know which form is the 1st to open you could pass its BindingContext
to the 2nd form...


this.BindingContext = form1.BindingContext;

Then get the same Currency Manager by passing the BindingContext the same
data source - something like...

CurrencyManager cm = BindingContext[dataSet];

Hope this helps, Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top