Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Vb.net 2010 combobox not write

Posted on 2010-11-12
11
Medium Priority
?
1,116 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
  • 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

Technology Partners: 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!

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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 …
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…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

876 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