multicolumn-combobox - Are you using this?

Hi

I have a small question about:
http://www.codeproject.com/cs/combobox/multicolumncombo.asp

How do you get the selected value back from this control. I trigger this multi-column combo when i change the selection in another combo:

private void cbContracts_SelectedIndexChanged(object sender, EventArgs e)
{
string contractId1 = cbContracts.SelectedValue.ToString();
string contractId2 = "";
DataSet contrprod = null;
String[][] contrProdParameters = new String[][] {
new String[] {"fetchTable", "Contrprod"},
new String[] {"fetchQueryTableList","Contrprod"},
new String[] {"fetchWhere","for each contrprod where copr-contr1 = '" + contractId1 + "' and copr-contr2 = '" + contractId2 + "'" }};
if (this.fetch(Properties.Settings.Default["libName"].ToString(), "fetchTable", out contrprod, contrProdParameters))
{
dtable =
new DataTable("contrprod");
dtable = contrprod.Tables[0];
multiColumnComboBox1.Table = dtable;
multiColumnComboBox1.DisplayMember =
"copr-prodid";
multiColumnComboBox1.ColumnWidths =
new int[] { 10, 20, 10 };
multiColumnComboBox1.ColumnsToDisplay =
new string[] { "copr-prodid", "copr-supplier", "copr-info" };
}
multiColumnComboBox1.ResetText();
}

As you can se i don't use sql. How can the selected value from the multicolumnCombobox

Thanks

Lars E.




Answer this question

multicolumn-combobox - Are you using this?

  • multicolumn-combobox - Are you using this?