Link to home
Start Free TrialLog in
Avatar of Dominic34
Dominic34Flag for Canada

asked on

How to search string in combobox vb.net

Hi,

We are developping an application for our in-house management in ASP.net 3.5 build in VB 2008. There is a combobox fill with hundreads of clients. The operator wants to be able to enter any keyword to select the right client. For exemple:

"Les industries P.H. Tech" (name of the client retrieved from the database in the combobox).
Operator would want to be able to type "Tech" and automatically, it shows the right client in the combo.

How can we do that in ASP.net ?

thanks for your time and help
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Do you want to autocomplete  the combobox in your application or is it some kind of filtering when you click on a button (after entering a string to search for)


AutoComplete ComboBox in VB.Net
http://www.codeproject.com/KB/cpp/autocomplete_combobox.aspx

Using AutoComplete in the AJAX Toolkit in VB.NET
http://www.ajaxtutorials.com/ajax-tutorials/using-autocomplete-in-the-ajax-toolkit-in-vb-net/
Avatar of Dominic34

ASKER

For autocomplete, operator have to type the correct beginning of the string. In my example "Les industries P.H. Tech", operator have to type "Les .... " for the autocomplete to work.

Operator wants to be able to enter a keyword, because she doesn't necessarely remember the exact name of each client. So by typing "Tech" in the combobox, it should automatically find the correct client name (Les Industries ....). Is it possible to do that directly in the combobox properties of event without any kind of "search" button ?
You'll have to create your list / disctionary of keywords (probably on load / populating the combobox) and then have the autocomplete event search that list / dictionary.
ASKER CERTIFIED SOLUTION
Avatar of kdwood
kdwood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks! that's what I was looking for!