Databinding Question
-
I have two combo boxes that have a parent child relationship. So when comboA changes comboB uses a new DataSource and the drop down values are updated. This works correctly, but now I am databinding the selectedvalues of each combo box to an object. Sometimes the databinding works correctly, meaning comboA is bound first then comboB updates with a new list and comboB's value is bound correctly. Sometimes comboB is bound before A which causes B to be empty after A populates itself. How do you control the order in which values are bound to their controls? I have tried changing the order of the combo boxes on the form, but no luck. Anyone have any ideas? Thanks
Mike Lasseter
-
I have two combo boxes that have a parent child relationship. So when comboA changes comboB uses a new DataSource and the drop down values are updated. This works correctly, but now I am databinding the selectedvalues of each combo box to an object. Sometimes the databinding works correctly, meaning comboA is bound first then comboB updates with a new list and comboB's value is bound correctly. Sometimes comboB is bound before A which causes B to be empty after A populates itself. How do you control the order in which values are bound to their controls? I have tried changing the order of the combo boxes on the form, but no luck. Anyone have any ideas? Thanks
Mike Lasseter
mr_lasseter wrote:
How do you control the order in which values are bound to their controls?
By doing it in code instead of via the designer.
-
mr_lasseter wrote:
How do you control the order in which values are bound to their controls?
By doing it in code instead of via the designer.
Yeah, that's what I ended up doing, but no control through the designer?
Mike Lasseter
-
Yeah, that's what I ended up doing, but no control through the designer?
Mike Lasseter
I wouldn't expect so. The designer will always be a set of shortcuts for people who prefer not to have to write code. It can never be as flexible as actual programming.