When the value is changed in the first, does the SelectedIndexChanged event
fire in the second?
If the second list is on the many side, it doesn't seem like you would want
it to arbitrarily select one of the many values. If you want the first one
in the list to be selected, set the selected index value of the second to be
0. You might need an application.doevents on your first combobox
selectedIndexChanged event before you tell the second box what value to
select.
If the relationship makes the change for you and only the display value is
changed, you can also force a change in the underlying record wtih something
like the following:
Dim Order As PR_DataDataSet.OrdersRow = _
CType(CType(OrdersBindingSource.Current, Data.DataRowView).Row, _
PR_DataDataSet.OrdersRow)
Order.MyValue = ComboBox2.SelectedValue
Your endedit and update events will store this.
RB
--
remove underscore to send me mail, no spam
[quoted text, click to view] "Raggy Mcfadden" <Raggy@discussions.microsoft.com> wrote in message
news:F1231998-1C08-45A7-B6D3-11AE6E774643@microsoft.com...
> Hello,
>
>
> In a windows form I have 2 comboboxes. One depends on the values selected
> in
> the other. In a one-to-many relation. This is done by setting the
> datasource
> of the other to the relation between the two. It all works unless I change
> the value of only the first combobox. Then the other combobox displays the
> first on the list, but actually nothing is selected. When I hit "save" on
> the
> datanavigator it doesn't save the right value - it just keeps the old
> value.
>
> All the bindings are done in the designer, and all are correct, because if
> I
> actually select a new value from the second combobox, everything works.
> Only
> when the second combobox is left untouched by the user does the problem
> occur
>
> This seems like a common problem, i.e. bug, but as yet, I haven't been
> able
> to find a common solution.
>
>
> /Raggy.