Hi Jeppe,
Thanks for your interest in my problem. This is probably more detail than
you were looking for
but here it goes:
Data Model: a 4-level relationship consisting of:
1. Order - Customer ID, order date, etc.
2. Order Detail - type of item, lens prescription, etc.
3. Order Detail Component - type of component such as frame or lenses
4. Order Detail Component Specification - specification for component such
as frame size or lens tint
On the WinForm I want to show the orders for a customer and, for each order,
show the order detail(s) associated with the order while allowing the user to
navigate through the orders and details. The standard form-based
BindingContext and CurrencyManager will handle this.
I also want to show the Order Detail Components and their specifications.
Each Order Detail typically consists of 2 components - a frame and lenses.
Since these are at the same "level" the single form-based BindingContext and
CurrencyManager will only allow the form to position to one of the Components
at a time.
To get around this I've created two panels each with their own
BindingContext and CurrencyManager that can act independently. However, to
do this each panel needs its own independent CurrencyManager (aka
BindingMangerBase) for the Order and Order Detail datasets. So now I have
three independent hierarchies: Form based, Frame Panel based, and Lens Panel
based.
The challenge comes with keeping them synchronized at the order and order
detail level. This appears to be deeper and more complex than simply setting
the currency manager positions. The particular problem I'm dealing with now
is that adding a new order corrupts a previously entered and saved order by
overwriting its value with the new record values.
I've started working with MS Tech Support on this and it seems to be related
to position setting but I haven't figured out the real reason for the
problems and may only be dealing the symptoms instead of the route cause.
So...I'm looking for information on this. While "best practices" would be
nice "any practices" would be helpful. The only reference I've found so far
is the very simple example in the help topic for the Binding Manager
constructor.
Thanks again,
Carl