ComboBoxCell CreateAutoCompleteComboBoxCell()
{
ComboBoxCell comboBoxCell = new ComboBoxCell();
comboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown;
comboBoxCell.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
comboBoxCell.AutoCompleteSource = AutoCompleteSource.CustomSource;
string[] customSourceItems = new string[] { "aaa", "bbb", "ccc", "ddd" };
comboBoxCell.AutoCompleteCustomSource.AddRange(customSourceItems);
comboBoxCell.Items.AddRange("(none)", "aaa", "bbb", "ccc", "ddd");
return comboBoxCell;
}
Private Function CreateAutoCompleteComboBoxCell() As ComboBoxCell
Dim comboBoxCell As New ComboBoxCell()
comboBoxCell.DropDownStyle = MultiRowComboBoxStyle.DropDown
comboBoxCell.AutoCompleteMode = AutoCompleteMode.SuggestAppend
comboBoxCell.AutoCompleteSource = AutoCompleteSource.CustomSource
Dim customSourceItems As String() = New String() {"aaa", "bbb", "ccc", "ddd"}
comboBoxCell.AutoCompleteCustomSource.AddRange(customSourceItems)
comboBoxCell.Items.AddRange("(none)", "aaa", "bbb", "ccc", "ddd")
Return comboBoxCell
End Function