Syncronizing across forms

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

Guest

It is easy to tie two datagrids together (e.g. customers and orders) on a
single form as the currency manager keeps things under control. However,I
wold like to put the dependent table (e.g. orders) on a separate form. I've
tried a whole bunch of different ways to do this but can't seem to get the
dependent table syncronized with its parent (e.g. customers) in the main
form. The problem is that each form has its own currency manager. Can
someone please tell me a way to get this to happen.
 
Hi,

rossu said:
It is easy to tie two datagrids together (e.g. customers and orders) on a
single form as the currency manager keeps things under control. However,I
wold like to put the dependent table (e.g. orders) on a separate form.
I've
tried a whole bunch of different ways to do this but can't seem to get the
dependent table syncronized with its parent (e.g. customers) in the main
form. The problem is that each form has its own currency manager. Can
someone please tell me a way to get this to happen.

The same CurrencyManager is used for the same binding within the same
BindingContext, but each Form has its own BindingContext ( which is by
default shared by all Controls ).

You can share the BindingContext between Forms, eg :
ordersForm.BindingContext = customersForm.BindingContext;

HTH,
Greetings
 

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