Click here to Skip to main content
15,892,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: can't add combobox Items (C#) Pin
Dunnewijk22-Nov-17 5:04
Dunnewijk22-Nov-17 5:04 
GeneralRe: can't add combobox Items (C#) Pin
Dave Kreskowiak22-Nov-17 5:15
mveDave Kreskowiak22-Nov-17 5:15 
GeneralRe: can't add combobox Items (C#) Pin
Sascha Lefèvre22-Nov-17 5:20
professionalSascha Lefèvre22-Nov-17 5:20 
GeneralRe: can't add combobox Items (C#) Pin
Dunnewijk22-Nov-17 6:56
Dunnewijk22-Nov-17 6:56 
GeneralRe: can't add combobox Items (C#) Pin
Sascha Lefèvre22-Nov-17 7:55
professionalSascha Lefèvre22-Nov-17 7:55 
AnswerRe: can't add combobox Items (C#) Pin
Dave Kreskowiak22-Nov-17 5:02
mveDave Kreskowiak22-Nov-17 5:02 
GeneralRe: can't add combobox Items (C#) Pin
Dunnewijk22-Nov-17 6:59
Dunnewijk22-Nov-17 6:59 
QuestionHow to filter like or = with a column in reportviewer C# Pin
C Sharp coder 201821-Nov-17 4:56
C Sharp coder 201821-Nov-17 4:56 
Rant[REPOST] How to filter like or = with a column in reportviewer C# Pin
Richard Deeming21-Nov-17 5:03
mveRichard Deeming21-Nov-17 5:03 
Questionhow i distinguish scan or keyboard value ? in windows ce ?? Pin
Member 1284514418-Nov-17 1:52
Member 1284514418-Nov-17 1:52 
AnswerRe: how i distinguish scan or keyboard value ? in windows ce ?? Pin
OriginalGriff18-Nov-17 2:22
mveOriginalGriff18-Nov-17 2:22 
AnswerRe: how i distinguish scan or keyboard value ? in windows ce ?? Pin
jschell20-Nov-17 6:30
jschell20-Nov-17 6:30 
GeneralNullable reference types in C# Pin
jschell17-Nov-17 10:38
jschell17-Nov-17 10:38 
GeneralRe: Nullable reference types in C# Pin
Eddy Vluggen18-Nov-17 0:54
professionalEddy Vluggen18-Nov-17 0:54 
GeneralRe: Nullable reference types in C# Pin
jschell20-Nov-17 6:10
jschell20-Nov-17 6:10 
GeneralRe: Nullable reference types in C# Pin
Eddy Vluggen20-Nov-17 6:23
professionalEddy Vluggen20-Nov-17 6:23 
GeneralRe: Nullable reference types in C# Pin
jschell20-Nov-17 6:36
jschell20-Nov-17 6:36 
GeneralRe: Nullable reference types in C# Pin
Eddy Vluggen20-Nov-17 6:37
professionalEddy Vluggen20-Nov-17 6:37 
QuestionC# and SQL application help Pin
Member 1352717817-Nov-17 6:35
Member 1352717817-Nov-17 6:35 
GeneralRe: C# and SQL application help Pin
Sascha Lefèvre17-Nov-17 7:07
professionalSascha Lefèvre17-Nov-17 7:07 
AnswerRe: C# and SQL application help Pin
OriginalGriff17-Nov-17 8:07
mveOriginalGriff17-Nov-17 8:07 
QuestionRe: C# and SQL application help Pin
Member 1352717817-Nov-17 11:13
Member 1352717817-Nov-17 11:13 
AnswerRe: C# and SQL application help Pin
OriginalGriff17-Nov-17 23:13
mveOriginalGriff17-Nov-17 23:13 
QuestionHow to put two columns in a combo box Pin
Member 1227854217-Nov-17 0:20
Member 1227854217-Nov-17 0:20 
Please help. How to put two columns in a combo box (list Box, text box:mad. I work with VS2015, c# and MySql 5.7.
Attached part of the code.

private void comboBox1_Click (object sender, EventArgs e)
{
MySqlConnection conn;
myConnectionString = pwput;
conn = new MySql.Data.MySqlClient.MySqlConnection ();
conn.ConnectionString = myConnectionString;
try
{
conn.Open ();
}
catch (MySqlException ex)
{
switch (ex.Number)
{
case 0:
MessageBox.Show ("DO NOT SUCCE TO CONNECT ON SERVER, CLOSE PROGRAM TO TAKE A REPLY");
Close ();
break;
case 1042:
MessageBox.Show ("NOT ACTIVE SERVER, SUBSCRIBE SERVER PA REPEAT CONNECTING");
Close ();
break;
}
conn.Close ();
}
if (conn.State! = ConnectionState.Open)
{
MessageBox.Show ("DO NOT SUCCE TO CONNECT ON SERVER \ r \ n CLOSE PROGRAM TO TAKE READY \ r \ n");
}
else
{
AutoCompleteStringCollection kontoopis = new AutoCompleteStringCollection ();
string wnadidok = "SELECT idkonto, FROM account name";
loadingData = false;
DataTable dtkon = new DataTable ();
dtkon.Columns.Add ();
dtkon.Columns.Add ();
MySqlDataAdapter mdkon = new MySqlDataAdapter (wnadidok, conn);
mdkon.Fill (dtkon);
loadingData = true;
comboBox1.DataSource = dtkon;
// which field is shown in the table below
comboBox1.DisplayMember = "idkonto";
comboBox1.ValueMember = "idkonto";
comboBox1.DisplayMember = "title";
comboBox1.ValueMember = "title";
comboBox1.SelectedIndex = -1;
comboBox1.Text = "";
loadingData = false;
}
conn.Close ();
}

Thank you
AnswerRe: How to put two columns in a combo box Pin
Eddy Vluggen17-Nov-17 0:46
professionalEddy Vluggen17-Nov-17 0:46 

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.