Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i hav created a database and textbox with autocomplete mode but (the particular coloum hav to be retriven while i am typing in the textbox.)
Posted
Comments
H.Brydon 28-Dec-13 13:06pm    
You could hire a boiler room to do it like Google does:

http://web.archive.org/web/20110403054337/http://www.google.com/intl/en/jobs/uslocations/mountain-view/autocompleter/index.html
govind per 19-Jun-14 1:50am    
thank you

Hello ,

try this way ..

take one TextBox named as "txtinvoice" in windows application and set
AutoCompleteSource=CustomSource 
and
AutoCompleteMode=Suggest
.

Now in Codebehind take one AutoCompleteStringCollection by this way .
AutoCompleteStringCollection autocomplete = new AutoCompleteStringCollection();

and fill that collection in winform_load event .
foreach (DataRow dr in ds.Tables[0].Rows)
 {
     autocomplete.Add(dr[0].ToString());
 }
txtinvoice. AutoCompleteCustomSource = autocomplete;


here ds is Dataset , where you have to filled data from databaseand Textbox will be populated with first column of that dataset .

thanks
 
Share this answer
 
So, you just need to add that column to the SQL Query, which you are using to retrieve the data from database.
 
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