hi,
im designing a form that updates a customer details. when the user enter an id, the form displays all the fields of that customer. my problem is that i have a combobox that displays the status of the customer, i filled the combobox with four items and when the user choose a customer, it displayed the correct value from the combobox. but when the user doesn't choose a value from the combobox, the comboxbox gets null instead of the value it was assign with. i want that if the user doesnt change the value in the combobox, the combobox will automatically gets the value it was assign with.
c#Programmer
0
Newbie Poster
Recommended Answers
Jump to PostI had a similar problem with a databound combo box and didnt figure it out but try comboBox.SelectedItem or comboBox.Text thats how i get the currently selected item or the text of a combobox
Jump to PostDid you set the DropDownStyle property correctly? http://msdn.microsoft.com/en-us/library/system.windows.forms.comboboxstyle(v=VS.90).aspx
All 8 Replies
ChrisHunter
152
Posting Whiz in Training
Featured Poster
c#Programmer
0
Newbie Poster
c#Programmer
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
c#Programmer
0
Newbie Poster
Mitja Bonca
557
Nearly a Posting Maven
c#Programmer
0
Newbie Poster
Mitja Bonca
557
Nearly a Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.