日期:2014-05-18 浏览次数:21042 次
void EditorSelectedIndexChanged(object sender, EventArgs e) { _selectedItem = (sender as ComboBox).SelectedItem; //Parent.HideEditor(); // 本来通过这行可以隐藏,但是当通过上下键修改时也立即隐藏了 }
void EditorKeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) Parent.HideEditor(); if (e.KeyCode == Keys.Escape) EndEdit(true); }
this.comboBox1.DataSource = dt; this.comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend; this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
------解决方案--------------------
http://lokcore.com/sunny/article.asp?id=11
http://lokcore.com/sunny/article.asp?id=17
TreeView控件和Combox组合控件开发