473,378 Members | 1,531 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,378 software developers and data experts.

c# Autocomplete more than one field

2
Hi all,

I have an app im working on that stores details of employees that users can then go back and search through.

I have an autocompleting combobox that searches through the surname, but if i make the first name box autocomplete, it searches the entire table not just first names relating to the surname already entered.

I understand why it does this, but im stuggling to figure out how to link it to the surname box.

Can anyone give me any pointers? Im a bit of a newbie, so apologies in advance!

Thanks
Jan 9 '08 #1
3 1426
nateraaaa
663 Expert 512MB
Hi all,

I have an app im working on that stores details of employees that users can then go back and search through.

I have an autocompleting combobox that searches through the surname, but if i make the first name box autocomplete, it searches the entire table not just first names relating to the surname already entered.

I understand why it does this, but im stuggling to figure out how to link it to the surname box.

Can anyone give me any pointers? Im a bit of a newbie, so apologies in advance!

Thanks
If you are using Visual Studio 2005 or higher then you could utilize the AutoComplete extender that comes with the AJAX control toolkit. You can find out more about this control and other AJAX controls here .

Nathan
Jan 9 '08 #2
ph1l
2
If you are using Visual Studio 2005 or higher then you could utilize the AutoComplete extender that comes with the AJAX control toolkit. You can find out more about this control and other AJAX controls here .

Nathan

Apologies for not making it clear, im developing a windows app not a web app and as far as i can see the AJAX controls are for the web only. Is there an equivalent for windows apps or any other ideas?

Thanks for your help
Jan 10 '08 #3
If I understand your question,

You can build a second AutocompleteList for the first names of the surnames but this time, fill the list by first filtering through the surname that was chosen.

Your SELECT statement would look something like: SqlCommand.CommandText = "SELECT Name FROM Employee WHERE Surname = ' " + ComboBox.Text + " ' "; // Or whatever textbox you are using.

This based on using a database and not a textfile, and a column for the firstname and the surname seperately.

After that it is the same process to populate the Firstname ComboBox with the Autocomplete as it was for the Surname ComboBox.

Hope that helps!
Feb 27 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: scorp7355 | last post by:
I was wondering if there is some other way to turn autocomplete off besides using "autocomplete=off", using a meta tag or something similar. It would be great if there is some way to turn it off...
1
by: Kubus | last post by:
Please help, IE 6.0 seems to hava a problem with input form autocomplete dropdown positioning. The dropdown list with last entries which appears normally right below the field but when used within...
40
by: Alex | last post by:
Hello, does anybody know how to turn off the autocomplete feature for a certain text field? I am aware of the "autocomplete" attribute, but I have seen other implementions achieving it...
1
by: Georg Scholz | last post by:
Hello, The class "Control" contains a documented Property "ControlType". So for example, in a form, you can write code like this: Dim c as control set c = me.Controls("textbox1") if...
1
by: moondaddy | last post by:
I have a form for entering a user's address and all fields have a required validating control associated with them and the error msg for each field displays right next to it. The normal behavior...
5
by: jdzemke | last post by:
I am getting 'options' is null or not an object using when using a dynamic dataset with a dropdown list in an html form. I am filling-in a text field and filtering the values in the drop-down. ...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
1
by: Pazeh | last post by:
Hello, a first timer here! stumbled upon one of the threads hear while searching on google & the feedback was awesome so I decided to jump in & ask my Q! I'm a newbie in AJAX, but I know my way...
10
by: bonneylake | last post by:
Hey Everyone, Right now i have a script where when someone starts typing in the input field that it populates the drop down box next to it. Once both the input and drop down box have the same...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.