944,110 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 1873
  • C# RSS
Dec 3rd, 2006
0

Partial Information - HELP

Expand 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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nissa2424 is offline Offline
3 posts
since Nov 2006
Dec 3rd, 2006
0

Re: Partial Information - HELP

Click to Expand / Collapse  Quote originally posted by nissa2424 ...
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.

C# Syntax (Toggle Plain Text)
  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.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 3rd, 2006
0

Re: Partial Information - HELP

>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.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Dec 3rd, 2006
0

Re: Partial Information - HELP

You might also need to use the get key pressed thingy? I must admit I missed that part:

Quote ...
want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 4th, 2006
0

Re: Partial Information - HELP

Click to Expand / Collapse  Quote originally posted by nissa2424 ...
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.. :!:
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Dec 6th, 2006
0

Re: Partial Information - HELP

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+"'"%'
Reputation Points: 10
Solved Threads: 0
Light Poster
amithasija is offline Offline
44 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: HOWTO: Share an SQL Connection between multiple forms within the same project
Next Thread in C# Forum Timeline: c#programming





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC