Click here to Skip to main content
11,715,165 members (74,611 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET2.0
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 30-Jan-13 23:58pm
Edited 31-Jan-13 18:01pm
v2
Comments
Sandeep Mewara at 31-Jan-13 10:36am
   
Is your combobox implemented as 'autosuggest'?
Member 9581909 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
Member 9581909 at 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 at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 495
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 125
0 Sergey Alexandrovich Kryukov 775
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320


Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100