Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Vb.net 2010 combobox not write

Posted on 2010-11-12
11
Medium Priority
?
1,109 Views
Last Modified: 2012-05-10
I would like when have a combobox, press a key for ex. "p" in the following example, and automatically combobox show the first item beginning with "p" (no problem). But also liked prevent user not write anything in the combobox.

France
Portugal
Usa
.....
0
Comment
Question by:rflorencio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
11 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1600 total points
ID: 34121339
set the DropDownStyle property to DropDownList
0
 

Author Comment

by:rflorencio
ID: 34121612
the main problem for me is prevent user to write in combobox,  changing property of combobox behavior is similar, or do I have to change other property.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34121895
I do not understand. the DropDownList setting will not allow user to input into the combo box. It forces to pick one item.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rflorencio
ID: 34122062
we are talking about the same control right? combobox ?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34122502
yes.
0
 
LVL 17

Assisted Solution

by:Zhaolai
Zhaolai earned 400 total points
ID: 34125064
Set the combobox's AutoCompleteMode = Suggest, and AutoCompleteSource=ListItems, either at design time or in the code.
0
 
LVL 17

Expert Comment

by:Zhaolai
ID: 34125074
See the screen shot below:
Screenshot.PNG
0
 
LVL 17

Expert Comment

by:Zhaolai
ID: 34125102
Ah, if you do not want user to write in the combobox, @emoreau already answered your question. :=)
0
 

Author Comment

by:rflorencio
ID: 34134872
I still can write in the combobox which can be? I have a bindingsource to this control, it may be?
Img.jpg
Img2.jpg
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34135056
can you try to provide items?

how do you bind your combo because I see that your DataSource property is empty.

are you setting the DropDownStyle elsewhere in code?
0
 

Author Closing Comment

by:rflorencio
ID: 34135216
I'm so sorry, the code actually had this property set to dropdown.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question