J
jehugaleahsa
Hello:
I am sure this is a common need, so I hope I can be brief.
I have a heirarchical database setup such that one customer can have
multiple contracts and those contracts can have multiple child
records, and so on. I would like very much to be able to move from one
customer to the other and for my code to automatically retrieve the
associated contracts and repopulate the Form.
Before I venture on writing some code of my own, I wanted to make sure
something like this doesn't already exist.
If it doesn't exist, I plan on writing an derived BindingSource that
recieves a parent BindingSource and calls an event handler to detect
when Current changes (the PositionChanged event). The event handler
will be responsible for populating the underlying DataSource of the
child BindingSource.
From this, I will be able to isolate the repopulation from the
interface. However, I have to deal with events such as the parent
BindingSource being cleared. That is why I was hoping to escape the
confusion and use an existing code set.
Let me know whether I should start writing this code or not. If there
is a Form control or property that does this, that would be nice to
know about too.
Thanks,
Travis
I am sure this is a common need, so I hope I can be brief.
I have a heirarchical database setup such that one customer can have
multiple contracts and those contracts can have multiple child
records, and so on. I would like very much to be able to move from one
customer to the other and for my code to automatically retrieve the
associated contracts and repopulate the Form.
Before I venture on writing some code of my own, I wanted to make sure
something like this doesn't already exist.
If it doesn't exist, I plan on writing an derived BindingSource that
recieves a parent BindingSource and calls an event handler to detect
when Current changes (the PositionChanged event). The event handler
will be responsible for populating the underlying DataSource of the
child BindingSource.
From this, I will be able to isolate the repopulation from the
interface. However, I have to deal with events such as the parent
BindingSource being cleared. That is why I was hoping to escape the
confusion and use an existing code set.
Let me know whether I should start writing this code or not. If there
is a Form control or property that does this, that would be nice to
know about too.
Thanks,
Travis