Click here to Skip to main content
15,916,846 members
Home / Discussions / C#
   

C#

 
GeneralRe: Modal dialog window does not appear in the Task Manager Pin
Ishara_P22-Jun-07 2:23
Ishara_P22-Jun-07 2:23 
QuestionVideo Player? Pin
granshah @ eVisionISF21-Jun-07 22:24
granshah @ eVisionISF21-Jun-07 22:24 
AnswerRe: Video Player? Pin
Colin Angus Mackay21-Jun-07 22:32
Colin Angus Mackay21-Jun-07 22:32 
AnswerRe: Video Player? Pin
Christian Graus21-Jun-07 23:35
protectorChristian Graus21-Jun-07 23:35 
Questionrestore connection Pin
jason_mf21-Jun-07 21:41
jason_mf21-Jun-07 21:41 
AnswerRe: restore connection Pin
Colin Angus Mackay21-Jun-07 22:28
Colin Angus Mackay21-Jun-07 22:28 
GeneralRe: restore connection Pin
jason_mf22-Jun-07 2:36
jason_mf22-Jun-07 2:36 
QuestionBound ComboBox problem Pin
kbalias21-Jun-07 21:21
kbalias21-Jun-07 21:21 
Hi
I am using Visual Studio 2005 and C# for a Windows application. I have a usercontrol with multiple input controls, including 3 Comboboxes. I am binding DataTables to my ComboBoxes and I am also using AutoCompleteStringCollections as the AutoCompleteCustomSources in these ComboBoxes. I am using the following general method to set up the ComboBoxes:

private void PopulateComboSmart(ComboBox combo, DataTable table, string displayMember, string valueMember, AutoCompleteStringCollection dataCollection)<br />
{<br />
    combo.DataSource = table;<br />
    combo.DisplayMember = displayMember;<br />
    combo.ValueMember = valueMember;<br />
<br />
    combo.AutoCompleteCustomSource = dataCollection;<br />
    combo.AutoCompleteMode = AutoCompleteMode.SuggestAppend;<br />
    combo.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;<br />
<br />
    combo.SelectedItem = null;<br />
}


On the form I have a large number of these UserControls for user input and the user can also add more or delete some of them. When the form loads all is ok and the selected items in the various ComboBoxes are null and nothing is displayed (I am doing this so that the user has to explicitly select an item in the ComboBoxes and not inadvertently use the first item in the ComboBox). However when the form refreshes the ComboBoxes that have not been selected yet all display the first item in the ComboBox even though the selected index have not changed.

Is there a way to force it to not display the first item until explicitly selected?

Thanks.

Kobus
AnswerRe: Bound ComboBox problem Pin
topcatalpha22-Jun-07 3:05
topcatalpha22-Jun-07 3:05 
GeneralRe: Bound ComboBox problem Pin
kbalias24-Jun-07 23:29
kbalias24-Jun-07 23:29 
QuestionListing DSN Names Pin
Programm3r21-Jun-07 21:21
Programm3r21-Jun-07 21:21 
Questionfree charting class? Pin
crash89321-Jun-07 20:30
crash89321-Jun-07 20:30 
AnswerRe: free charting class? Pin
Giorgi Dalakishvili21-Jun-07 20:36
mentorGiorgi Dalakishvili21-Jun-07 20:36 
AnswerRe: free charting class? Pin
Sathesh Sakthivel21-Jun-07 20:37
Sathesh Sakthivel21-Jun-07 20:37 
GeneralRe: free charting class? Pin
crash89322-Jun-07 6:59
crash89322-Jun-07 6:59 
GeneralRe: free charting class? Pin
crash89323-Jun-07 8:21
crash89323-Jun-07 8:21 
Questionc# How to Change the color of label1.text Pin
mercenary0121-Jun-07 20:20
mercenary0121-Jun-07 20:20 
AnswerRe: c# How to Change the color of label1.text Pin
Sathesh Sakthivel21-Jun-07 20:24
Sathesh Sakthivel21-Jun-07 20:24 
AnswerRe: c# How to Change the color of label1.text Pin
Sylvester george21-Jun-07 20:25
Sylvester george21-Jun-07 20:25 
AnswerRe: c# How to Change the color of label1.text Pin
DavidNohejl21-Jun-07 23:48
DavidNohejl21-Jun-07 23:48 
Questionlistview Pin
sunitkrishna21-Jun-07 20:01
sunitkrishna21-Jun-07 20:01 
QuestionRe: listview Pin
Sylvester george21-Jun-07 20:22
Sylvester george21-Jun-07 20:22 
AnswerRe: listview Pin
sunitkrishna21-Jun-07 20:48
sunitkrishna21-Jun-07 20:48 
Questionhow can I find my sent message? Pin
lockepeak21-Jun-07 19:50
lockepeak21-Jun-07 19:50 
AnswerRe: how can I find my sent message? Pin
giddy_guitarist28-Jun-07 1:37
giddy_guitarist28-Jun-07 1:37 

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.