Solved

How to search string in combobox vb.net

Posted on 2011-03-22
5
1,519 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

626 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