Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0
I want to do like when any character is entered into the textbox the appropriate list
Starting with this character is shown like dropdown list the selected value is filling in the textbox. This is only for windows form using C#
Posted 7-Feb-13 17:14pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

you can do this easily.
create an textbox index changed event and then bind the dropdown in that indexchanged event using like operator.
In the binding of the dropdown bind the id to the value field and the text content to the text showing field.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You should have a look at the "AutoComplete" properties of the text box.
There is:
that let's you set the source for autocompletion (File System, last URL, browser history, custom, ...)
that let's you select the way suggestions are proposed to the user
that let's you set the list of suggestion (it is a string collection) when the AutoCompleteSource is set to CustomSource.
I hope those properties will help you solve your problem.

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

  Print Answers RSS
0 Maciej Los 225
1 OriginalGriff 205
2 Manfred R. Bihy 190
3 CHill60 180
4 Sergey Alexandrovich Kryukov 164
0 OriginalGriff 7,395
1 Sergey Alexandrovich Kryukov 6,163
2 Maciej Los 3,754
3 Peter Leow 3,448
4 CHill60 2,702

Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 8 Feb 2013
Copyright © CodeProject, 1999-2014
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