Question:
VB.Net Drop Down List?
csdraska
2006-12-12 09:11:46 UTC
Is there a way that you can type in more then one char in a drop down list to find the info that populated the drop down list? So for example if I have a ddl with numbers 1-10 staring at 1.01..1.02..1.03 and goind to 10.00 if I click on the ddl box and type in 5 right now it will just show 5.00 in the list and will not let me keep typing. I want to know there is a setting or something that will let me type in 5.05 and show 5.05 in the ddl. Or if there is no way to enter more then 1 char in the box dose anyone have ideas on how i can get around this?
Five answers:
Gary K
2006-12-12 09:33:00 UTC
I believe what you are talking about is called "AutoComplete". It allows the user to type the first 1 or more characters of the desired selection in the list and automatically selects the next item that matches those characters.



If that is what you are trying to do, check out the AutoCompleteMode property.



Please note, I don't believe this will NOT work for HTML based forms, only Windows Forms.
AI
2006-12-12 09:48:39 UTC
You can enter more than 1 character. Just keep typing quickly. If you want to select a name starting with "As" then type letters a and s quickly without a pause. It will select proper item.

Alternatively, you can try folowing:



Change DropdownStyle property of Combobox to DropDown. This would give you options of both selecting a value from down or type in text. On validate or Keydown event you can right the code to match the entered text with item's text in drop down list. If text matches then select the macthed item. You can use GetItemText method to get the text of a particular item in dropdown. Try using for each loop.
anonymous
2006-12-12 09:28:46 UTC
in the properties window of your Drop down list (which is called ComboBox in VB), lokk for MaxLength and set it to 5 (as there are 4 characters in 10.00)
?
2016-12-30 12:40:20 UTC
What i did on mine replaced into, likes and dislikes, on separate drop down record. yet you're able to do something somewhat, like bands, activities, sought after issues, sought after actress and lots extra. solid success and was hoping i helped.
mcsgul
2006-12-12 09:30:55 UTC
Take a look at Microsoft web site, where they have published Visual studio.Net video tutorials. that will help you alot. Try the site.



http://msdn2.microsoft.com/en-us/vstudio/default.aspx


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...