tags:

views:

34

answers:

1

Is there anyway to have the autocomplete for a combo box to start from anywhere in the text, let me give you an example. If I have someone named john smith in the combobox if I start with the letter 'j' it pulls up john smith but less say I want to start with the letter 's' to search for his last name, is that possible, if so does anyone have code or a link to code that does this.

+1  A: 

The standard .NET WinForms ComboBox-control does offer auto-completition functionality for the first case you described (see the properties AutoCompleteCustomSource, AutoCompleteMode and AutoCompleteSource).

However, for your second example, you will need to implement some custom logic that will e.g. check whether the currently entered text is a subtext of an existing entry.

Christian
Thanks ..was indeed helpful.. :)
Niraj Doshi
Great! If it was helpful, vote up or accept my answer please :)
Christian