Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Databound ComboBox and custom user entry
I want to use a combobox to provide salutaion options ("Mr.", "Mrs", "Phd",...). A lookup-Table "salutation" provides these options.
In my Address-table there is a field "salutation" (varchar(20)).
The Databinding is set up according to the MM rules and works fine (using dataviews dv[tablename]):
BindingSource = Salutation
BindingSourceDisplayMember = Salutation.dvSalutation.Salutation
BindingSourceValueMember = Salutation.dvSalutation.Salutation
BindingValueSource = Address
BindingValueSourceMember = Address.dvAddress.Salutation
The ComboBox is set to DropDownStyle = DropDown.
Now I want to allow the user to enter a custom salutation, like "Your Highness" ;-), which is not provided in the lookup table.
I can type into the ComboBox field, but after saving the record the custom salutation is gone. Only salutations provided by the lookup table can be saved.
Is there a way to provide custom data entry into databound lookup comboboxes?
Thanks in advance,
Soenke
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement