473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Searching Array of Names

Hi,
I would like to have an array or some other kind of a variable (please
suggest) that holds names of persons.

When I type in a text box a letter, say 'A', the array will be
searched for all names starting with 'A' and a list view will be
filled with only names starting with 'A'.

The same will happen when I type next letter in the name, say 'Al'.
Array will be searched for names starting with 'Al' and list view will
be reloaded with names that start with 'Al' only.

The same would repeat all the way untill I finish typing the name of
the person I am looking for.

Can somebody give me an idea how to do this?

Any help will be appreciated,
Dino

Nov 20 '05 #1
2 1213
Hi,

Here is a combobox which does what you want.

http://www.gotdotnet.com/Community/U...a-09bc8fd2860b

Ken
----------------------
"Dino Buljubasic" <di**@noplacelikehome.com> wrote in message
news:86********************************@4ax.com...
Hi,
I would like to have an array or some other kind of a variable (please
suggest) that holds names of persons.

When I type in a text box a letter, say 'A', the array will be
searched for all names starting with 'A' and a list view will be
filled with only names starting with 'A'.

The same will happen when I type next letter in the name, say 'Al'.
Array will be searched for names starting with 'Al' and list view will
be reloaded with names that start with 'Al' only.

The same would repeat all the way untill I finish typing the name of
the person I am looking for.

Can somebody give me an idea how to do this?

Any help will be appreciated,
Dino

Nov 20 '05 #2
* Dino Buljubasic <di**@noplacelikehome.com> scripsit:
I would like to have an array or some other kind of a variable (please
suggest) that holds names of persons.

When I type in a text box a letter, say 'A', the array will be
searched for all names starting with 'A' and a list view will be
filled with only names starting with 'A'.

The same will happen when I type next letter in the name, say 'Al'.
Array will be searched for names starting with 'Al' and list view will
be reloaded with names that start with 'Al' only.

The same would repeat all the way untill I finish typing the name of
the person I am looking for.


Instead of refilling the listview, you can remove the items which do not
start with the right prefix. Just add all items to the listview. Then
you loop through the items and remove all items with 'Not (lvi.Text Like
"A*")' etc.

Just my 2 euro cents.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bryce Maschino | last post by:
hello, i am trying to make a java program that will take several different arrays and search through them in a loop suchs as: for (i=0; i < 5; i++) { if (firstarray<such and such { blah blah
5
by: Alan Mackenzie | last post by:
I've recently moved onto a C++ project with a large number of directories (several hundred) containing an even larger number of C++ source files. There are vastly more ways in C++ to obfuscate a...
9
by: deanfamily11 | last post by:
I have an ADT and I'd like to search for certain items in it. How can I accomplish this?
4
by: Thomas Christmann | last post by:
Hi! First let me apologize for asking this question when there are so many answers to it on Google, but most of them are really contradicting, and making what I want to do very performant is...
14
by: Walter Dnes (delete the 'z' to get my real address | last post by:
I took a C course some time ago, but I'm only now beginning to use it, for a personal pet project. My current stumbling-block is finding an efficient way to find a match between the beginning of a...
4
by: jonny | last post by:
Hey I need to search an array list to remove duplicate Data The list is populated by a search function that enters in a name if the it is told too This causes duplicate names to be entered...
5
by: Jerim79 | last post by:
I am trying to create a search system for an existing database. Because of the way the database is setup, I need to traverse three different tables, gathering information: 1) Go into table1 and...
4
mfshake
by: mfshake | last post by:
I am try to make the user enter name and password then ask them if they want to search. The menu has the options and i am having trouble with the search method. Here's my server: import...
5
by: lemlimlee | last post by:
hello, this is the task i need to do: For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.