本文介绍了我们如何使DatGridViewTextBoxColumn具有AutoComplete SuggestAppend属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在datagridview中创建 DatGridViewTextBoxColumn 获取suggestAppend属性,以便从任何位置选择文件?
请帮助!!!
Hi,
How can we make a DatGridViewTextBoxColumn in a datagridview take the suggestAppend property in order to select a file from any location?
Please help!!!
推荐答案
private void dgvIsland_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
TextBox prodCode = e.Control as TextBox;
if (datagridview1.CurrentCell.ColumnIndex == 2)
{
var source = new AutoCompleteStringCollection();
if (prodCode != null)
{
prodCode.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
prodCode.AutoCompleteSource =AutoCompleteSource.FileSystem;
}
}
else
prodCode.AutoCompleteCustomSource = null;
}
这篇关于我们如何使DatGridViewTextBoxColumn具有AutoComplete SuggestAppend属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!