M
Matt
I'm not entirely sure how to describe this issue. I have a number of
ComboBoxes in my application which have their text properties bound to a
field in a data set. The items loaded in the ComboBox are not data bound
(they just use the built in collection property of the ComboBox), and
they are all set to use the DropDownList style. When moving from record
to record via a BindingNavigator or a DataGridView (in master/detail
format), the text ComboBox appropriately reflects the value of the field
in the database, so long as it is not null. However, if you pass from a
record which contained a non-null value in the field represented by the
ComboBox to one which contains a null value in the same field, the
ComboBox simply continues to display the last non-null value it held.
For example: I want users to be able to select a Prefix/Salutation (Mr.,
Mrs., etc...) for Members being stored in an application. If you move
from a record with prefix filled in (eg., Mr. John Smith), to one
without (eg., Jane Doe), the ComboBox will continue to display the "Mr."
prefix. If, however, you move to another record which contains a prefix
(eg., Dr. Robert Smith), it will correctly display the new value.
Is this intended behavior, and if so, is there an effective way to get
around it?
Thanks,
Matt
ComboBoxes in my application which have their text properties bound to a
field in a data set. The items loaded in the ComboBox are not data bound
(they just use the built in collection property of the ComboBox), and
they are all set to use the DropDownList style. When moving from record
to record via a BindingNavigator or a DataGridView (in master/detail
format), the text ComboBox appropriately reflects the value of the field
in the database, so long as it is not null. However, if you pass from a
record which contained a non-null value in the field represented by the
ComboBox to one which contains a null value in the same field, the
ComboBox simply continues to display the last non-null value it held.
For example: I want users to be able to select a Prefix/Salutation (Mr.,
Mrs., etc...) for Members being stored in an application. If you move
from a record with prefix filled in (eg., Mr. John Smith), to one
without (eg., Jane Doe), the ComboBox will continue to display the "Mr."
prefix. If, however, you move to another record which contains a prefix
(eg., Dr. Robert Smith), it will correctly display the new value.
Is this intended behavior, and if so, is there an effective way to get
around it?
Thanks,
Matt