Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more: , +
my Question is in that dropdown tomany data is there and when ever we search for somthing it's search with first letter only

for example
Mydropdownlist data is
anil
sunil
suman
usha

whenever i select combobox and type s key on keyboard it will show suman and when ever i'll type firstletter S and secondletter U it will show usha

but i wanna to search with SU

//but i want
C#
when ever i'll type su it will show sunil


please tell me

thanks
Posted
Updated 19-Feb-15 22:00pm
v5
Comments
ZurdoDev 19-Feb-15 22:51pm    
I do not understand your question.
DamithSL 19-Feb-15 23:27pm    
how you filter data? are you using AutoCompleteSource or any event like KeyPress to filter and display data?
update the question with related code samples
Parazival 19-Feb-15 23:39pm    
i did not use any events and
i am only bind the data into combobox from database
Maddy selva 20-Feb-15 0:13am    
How do u type into combobox???.
Parazival 20-Feb-15 0:31am    
i can't type in combobox because dropdownstyle is dropdownlist
i'll select that combobox and just click on keyboard

set the following properties for combobox

C#
comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
 
Share this answer
 
Comments
CHill60 20-Feb-15 7:18am    
5*Worth mentioning that these can be set via the property windows at design time if desired
What you are after is AutoComplete functionality - but the default behaviour for a combobox is to just use the first letter of your "search"

This CP article might help (I haven't tried it personally) Auto Complete ComboBox[^] and there are further options on this SO Post[^]
 
Share this answer
 

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