private void SetupComboBox() { comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems; m_props = m_db.GetSiteProperties(); m_sites = m_db.GetSiteCatalog(); var temp = m_sites.Copy(); // copy for the combo box (selection only) for (int i = 0; i < temp.Rows.Count; i++) { var r = temp.Rows[i]; r["description"] = r["siteid"].ToString().ToUpper() + " " + r["description"].ToString(); } comboBox1.DataSource = temp; comboBox1.ValueMember = "siteid"; comboBox1.DisplayMember = "description"; }
public SiteMetaData(TimeSeriesDatabase db) { m_db = db; InitializeComponent(); comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems; m_props = db.GetSiteProperties(); m_sites = db.GetSiteCatalog(); var temp = m_sites.Copy(); // copy for the combo box (selection only) for (int i = 0; i < temp.Rows.Count; i++) { var r = temp.Rows[i]; r["description"] = r["siteid"].ToString().ToUpper() + " " + r["description"].ToString(); } comboBox1.DataSource = temp; comboBox1.ValueMember = "description"; comboBox1.DisplayMember = "description"; }
public SiteMetaData(TimeSeriesDatabase db) { m_db = db; InitializeComponent(); comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems; m_props = db.GetSiteProperties(); m_sites = db.GetSiteCatalog(); var temp = m_sites.Copy(); // copy for the combo box (selection only) for (int i = 0; i < temp.Rows.Count; i++) { var r = temp.Rows[i]; r["description"] = r["siteid"].ToString().ToUpper() + " " + r["description"].ToString(); } comboBox1.DataSource = temp; comboBox1.ValueMember = "description"; comboBox1.DisplayMember = "description"; }