I've got problem with getting values from combobox. Code below how i get data from database and populate it in combobox. The problem is that few lines below this code i need to get value member value when something is selected in this combobox. With this code VS compile successfully. But the result is not correct. I'm not sure that this code actually works correct.
comboBox2.ValueMember = Issues.Tables[0].Columns[0].ToString();
If you understand me can you help me?

Java
String ConnStr = settings.ConnectionString().ToString();
String SQLIssues = "SELECT issueid, projid, summary FROM issues";
SqlDataAdapter IssuesAdpt = new SqlDataAdapter(SQLIssues, ConnStr);
DataSet Issues = new DataSet();
IssuesAdpt.Fill(Issues);
foreach (DataRow Issue in Issues.Tables[0].Rows)
{
comboBox2.Items.Add(Issue[2]);
comboBox2.ValueMember = Issues.Tables[0].Columns[0].ToString();
}
Niradhip ChakrabortyRank #428 · 5.8K pointsPosted Jun 16, 2008, 12:57 AM EDT
Check Out the following article:
http://www.codersource.net/asp_net_dropdownlist.html
1 short reply
count nazgul2 pointsPosted Jun 16, 2008, 6:21 AM EDT