Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
3.46/5 (3 votes)
See more:
Hello every one.

I need your help about a control in c# that autocomplete text from a database
do you give me any component and code.

Thanks in advance.

Leonardo Ayala R.
Posted
Comments
Sergey Alexandrovich Kryukov 28-Jan-12 12:55pm    
What code? Please, ask a question first. What is "TextBox"? Do you think there is only one class with this name? No.
Please, fully-qualified name. Remove "Visual-Studio" and "VisualStudio" (!) tags, tag the type of application and UI library. Is it WPF, Forms, ASP.NET, what?
--SA
Sergey Alexandrovich Kryukov 28-Jan-12 12:56pm    

A suggestion to all experts:

We should stop attempting to answer any questions if OP does not properly specify type of application, UI library and other relevant detail which would exclude this kind of confusion. All type mentioned in the question should be written in fully-qualified form. We should request it and only answer when OP comply. Multiple failures to specify such detail became a curse of this forum.



--SA

Since it is a desktop (Windows) Application, Try the AutoComplete properties in Windows TextBox.

There are three properties you might need to take care of:
TextBox.AutoCompleteCustomSource
TextBox.AutoCompleteSource
TextBox.AutoCompleteMode


The below MSDN links should help:

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode.aspx[^]

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletesource.aspx[^]

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletecustomsource.aspx[^]
 
Share this answer
 
v3
Comments
leocode7 28-Jan-12 12:11pm    
Hello, thanks, but my aplication is not web. it is a desktop aplication, or stand alone. it is only in c# code. no aspx.
can you give me another resource?
Sergey Alexandrovich Kryukov 28-Jan-12 12:55pm    
You still did not explain what application.
--SA
[no name] 28-Jan-12 12:30pm    
I've updated as per your requirement, Mark as answer if it solves! :)
Er Anuj Kaushal 30-Nov-12 12:44pm    
Hello, I have the same query, so please help me out. its like the last remaining thing in my project. what i want is , if i press "A" alphabet in textbox or datagridview while inserting the data again and again. i want it should open a list of all the items of same suffix. like if i press "A" then all the items starting from "A" will be opened in the list and i dont hv to write multiple times. Can u please help me out. Thanks
Sergey Alexandrovich Kryukov 28-Jan-12 12:57pm    
Please see my comment above, in red color.
--SA
Check this Autocomplete Menu[^]
 
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