Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want my combo box only fill data from database and not fill with any random values type in combo box

What I have tried:

Can any one help me
I connect combo box with database and it's work fine only Problem is my combo box work my database data and directly typed any other value
Posted
Updated 15-May-20 21:55pm

1 solution

Try changing the ComboBox Style: set the ComboBox.DropDownStyle Property[^] to DropDownList in the designer.
 
Share this answer
 
Comments
Amar chand123 16-May-20 4:02am    
I try but i have a problem
Data in combo box is
Maha
Rana
Ralan
Rahul

If i type combo box "ral" and press tab key., and if i type "Rahul" and press tab then in my combo box value always show "rana"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900