Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hey friends,

I am using a AJAX combobox in my website built with VS2008 and ASP.NET 3.5
I have bound the combobox to a sqlsource and on run time it fetches 60 records.

My problem is that when i start typing in the combobox,my search never gets narrowed.Even if i write the full name,the combobox suggests me the correct entry but everytime i see more than 40 records on the combobox.


What i want is :


HOW TO IMPLEMENT "SEARCH WHILE TYPING" IN AJAX COMBOBOX.
Posted
Updated 31-Jan-13 18:01pm
v2
Comments
Sandeep Mewara 31-Jan-13 10:36am    
Is your combobox implemented as 'autosuggest'?
Member 9581909 1-Feb-13 0:00am    
yes.....autosuggest that takes me to that entry but doesnt stop the combobox from rendering other enteries.

for instance, when we go to IRCTC.CO.IN and try to find the station NEW DELHI.
when u type 'N', it will populate the conbobox with all the entries starting with 'N'. I guess what i want is "Search while typing" in combobox.

Here is a simple point: if a content of a combo box list is so big that you need to perform search in it, you are heavily abusing this control. Yes, 100%. Review your UI design, this is the only way to proceed.

—SA
 
Share this answer
 
Ok, so based on what you ask in comments, you seek for Autosuggest textbox control and not a combobox.

Here you go:
Autocomplete Textbox Control[^]
AutoComplete TextBox[^]
Create an AutoComplete TextBox Control in C#[^]
AutoComplete TextBox in C#[^]

If needed, look here[^] for more.
 
Share this answer
 
Comments
Member 9581909 1-Feb-13 6:11am    
If i use AutoComplete textbox(which i already have) ,there is noway to see all the enteries.Also how will i use mouse
Sandeep Mewara 1-Feb-13 6:41am    
Autocomplete/autosuggest are for those scenario when you have number of entries. If you want to see all, then this is not the right control...

Further, based on your questions, now I doubt your requirement and design. I agree with SA now.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900