我正在处理我的dataGridView,我正试图让我的一个单元格自动完成,但它无法正常工作。
C#代码:
private void dataGridRequest_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
TextBox prodCode = e.Control as TextBox;
if (prodCode != null)
{
prodCode.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
prodCode.AutoCompleteCustomSource = itemList;
prodCode.AutoCompleteSource = AutoCompleteSource.CustomSource;
}
}