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

x
?
Solved

How to search string in combobox vb.net

Posted on 2011-03-22
5
Medium Priority
?
1,544 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Dominic34
[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
5 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 35190345
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/
0
 

Author Comment

by:Dominic34
ID: 35190554
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 ?
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 35190960
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.
0
 
LVL 10

Accepted Solution

by:
kdwood earned 2000 total points
ID: 35192475
Dominic,

In my opinion, what you are wishing to do with the combobox alone seems like it might be unfriendly for the user.  

How about using the AutoCompleteExtender available in Ajax:

"Partial Auto-Completion - The auto-complete feature of the ComboBox will only match items that start with the first user-typed character. An AutoCompleteExtender's ServiceMethod, on the other hand, can be configured to match items where the user-typed text lies somewhere after the first character in the item. A ComboBox cannot be used in application scenarios that require items to be "partially matched" like this."

http://www.asp.net/ajaxlibrary/act_ComboBox.ashx
http://www.infinitezest.com/articles/the-structure-and-usage-of-autocompleteextender-control.aspx

Regards,

Keith



0
 

Author Closing Comment

by:Dominic34
ID: 35193166
thanks! that's what I was looking for!
0

Featured Post

Industry Leaders: 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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

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