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.
 
Back
Top