Partial Information - HELP

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 3
Reputation: nissa2424 is an unknown quantity at this point 
Solved Threads: 0
nissa2424 nissa2424 is offline Offline
Newbie Poster

Partial Information - HELP

 
0
  #1
Dec 3rd, 2006
Hey guys,
This is my first time using Daniweb and I think I messed up! I need HELP--- I need a electronic addressbook. I need 8 text boxes:
1) name of contacts
2) company name
3) Address
4) city
5) state
6) phone
7) fax
8) email address
But the problem comes in when I try to write the program to read only partially. For example name of contact, instead of typing the whole name I only want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.

I want each textbox to read partially.

Please help
CONFUSED
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Partial Information - HELP

 
0
  #2
Dec 3rd, 2006
Originally Posted by nissa2424 View Post
Hey guys,
This is my first time using Daniweb and I think I messed up! I need HELP--- I need a electronic addressbook. I need 8 text boxes:
1) name of contacts
2) company name
3) Address
4) city
5) state
6) phone
7) fax
8) email address
But the problem comes in when I try to write the program to read only partially. For example name of contact, instead of typing the whole name I only want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.

I want each textbox to read partially.

Please help
CONFUSED
Sounds like a problem with class design to me.

  1. public class addressBook
  2. {
  3. string contactName
  4. string phoneNo
  5. }

Then you could search the array of objects by either .contactName or .phoneNo etc.
Last edited by iamthwee; Dec 3rd, 2006 at 6:50 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,721
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 735
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Partial Information - HELP

 
0
  #3
Dec 3rd, 2006
>For example name of contact, instead of typing the whole name I only
>want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.
I can think of a few ways to do this. The first is autocomplete where you keep track of the characters being entered, search for the string up to the most recent character typed and complete the entry with the first match of that search (the TextBox control supports this feature natively). Next, you can do the same thing except filter the contents of a combo box instead of just using a straight text box. A more user friendly design would probably use a tooltip and/or context menu with suggested matches, but that would take a little more work.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Partial Information - HELP

 
0
  #4
Dec 3rd, 2006
You might also need to use the get key pressed thingy? I must admit I missed that part:

want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: Partial Information - HELP

 
0
  #5
Dec 4th, 2006
Originally Posted by nissa2424 View Post
Hey guys,
This is my first time using Daniweb and I think I messed up! I need HELP--- I need a electronic addressbook. I need 8 text boxes:
1) name of contacts
2) company name
3) Address
4) city
5) state
6) phone
7) fax
8) email address
But the problem comes in when I try to write the program to read only partially. For example name of contact, instead of typing the whole name I only want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.

I want each textbox to read partially.

Please help
CONFUSED
you need an ontextchange event that will popup a list of possible names based on the letter typed.

if your information is stored in a database you could do this very easily.

like when they start to type the letter k an SQL statement would run that would return

SELECT FIRSTNAME FROM [SOMEDATABASE] WHERE FIRSTNAME LIKE 'k%';

but thats the best i can come up with.

or prebuild an array with all of the names sorted by letter and then use the same logic.. :!:
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 44
Reputation: amithasija is an unknown quantity at this point 
Solved Threads: 0
amithasija amithasija is offline Offline
Light Poster

Re: Partial Information - HELP

 
0
  #6
Dec 6th, 2006
you have to trap ontext change event by double clickiking on textbox in design form, and run sql like(select (columnname) frm(database)where (columnname) like =' "'"+textboxname.text+"'"%'
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC