Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
AnswerRe: validate input Pin
Josh Smith9-Jun-06 4:24
Josh Smith9-Jun-06 4:24 
GeneralRe: validate input Pin
donkaiser9-Jun-06 4:40
donkaiser9-Jun-06 4:40 
GeneralRe: validate input Pin
Josh Smith9-Jun-06 5:15
Josh Smith9-Jun-06 5:15 
QuestionHow to run App from stream ? Pin
hdv2129-Jun-06 3:20
hdv2129-Jun-06 3:20 
AnswerRe: How to run App from stream ? Pin
Josh Smith9-Jun-06 4:00
Josh Smith9-Jun-06 4:00 
Questionsearch in combobox Pin
Mohammed Elkholy9-Jun-06 2:09
Mohammed Elkholy9-Jun-06 2:09 
AnswerRe: search in combobox Pin
Michael Potter9-Jun-06 6:16
Michael Potter9-Jun-06 6:16 
AnswerRe: search in combobox Pin
Drew McGhie9-Jun-06 8:36
Drew McGhie9-Jun-06 8:36 
I think you might mean "How do I get a combobox to autocomplete input based on a letter?", if so, check out the combobox.autocomplete methods. look at AutoCompleteSource, AutoCompleteMode autocompletestringcollection.

I did this on the fly, so don't copy it word for word, but this should give you an idea.

//this assumes 2 comboboxes, cbSource and cbDestination.

<br />
private void BuildCompleteList()<br />
{<br />
   AutoCompleteStringCollection cityList = new AutoCompleteStringCollection();<br />
   foreach(DataRow dr in myCityInformationTable)<br />
   {<br />
      cityList.Add(dr["CityName"]);<br />
   }<br />
   cbSource.AutoCompleteCustomSource = cityList;<br />
   cbList.AutoCompleteCustomSource = cityList;<br />
}<br />


In addition, remember to set the cb autocompletesource property for each combobox to custom source, and autocomplete mode to either SuggestAppend, Suggest, or Append as suits your functionality needs.

Hope this helps.

//Also, code from this was paraphrased from an example on page 160 of Brian Noyes "Data Binding with Windows Forms 2.0". I figured that I wrote this example, but I used his example as a starting point. Its a great reference for all your databinding/etc needs.
GeneralRe: search in combobox Pin
Mohammed Elkholy11-Jun-06 8:21
Mohammed Elkholy11-Jun-06 8:21 
QuestionActive Directory [modified] Pin
pooja_a289-Jun-06 1:19
pooja_a289-Jun-06 1:19 
AnswerRe: Active Directory [modified] Pin
Corinna John9-Jun-06 1:44
Corinna John9-Jun-06 1:44 
GeneralRe: Active Directory Pin
pooja_a2813-Jun-06 2:17
pooja_a2813-Jun-06 2:17 
QuestionRegarding Windows Service in C# Pin
_mubashir9-Jun-06 0:27
_mubashir9-Jun-06 0:27 
GeneralRe: Regarding Windows Service in C# [modified] Pin
Le centriste9-Jun-06 4:42
Le centriste9-Jun-06 4:42 
QuestionEditing ListViewSubItem in C# Pin
peshawarcoder8-Jun-06 23:59
peshawarcoder8-Jun-06 23:59 
AnswerRe: Editing ListViewSubItem in C# Pin
Corinna John9-Jun-06 1:46
Corinna John9-Jun-06 1:46 
QuestionSqlCommand.parameterCollection ?? Pin
maaran8-Jun-06 23:54
maaran8-Jun-06 23:54 
AnswerRe: SqlCommand.parameterCollection ?? Pin
Colin Angus Mackay9-Jun-06 0:04
Colin Angus Mackay9-Jun-06 0:04 
GeneralRe: SqlCommand.parameterCollection ?? Pin
maaran9-Jun-06 0:27
maaran9-Jun-06 0:27 
GeneralRe: SqlCommand.parameterCollection ?? Pin
Guffa9-Jun-06 3:02
Guffa9-Jun-06 3:02 
QuestionDecreasing CPU usage Pin
Shy Agam8-Jun-06 23:42
Shy Agam8-Jun-06 23:42 
AnswerRe: Decreasing CPU usage Pin
Robert Rohde8-Jun-06 23:46
Robert Rohde8-Jun-06 23:46 
GeneralRe: Decreasing CPU usage Pin
Shy Agam8-Jun-06 23:52
Shy Agam8-Jun-06 23:52 
AnswerRe: Decreasing CPU usage Pin
Shy Agam9-Jun-06 23:28
Shy Agam9-Jun-06 23:28 
QuestionHow to Disable Tab inTabControl using .NET 2.0 [modified] Pin
VenkataRamana.Gali8-Jun-06 23:30
VenkataRamana.Gali8-Jun-06 23:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.