是否可以使用maskeditbox在特定的datagridview列中进行自定义输入?
我试过了:
private void dgLokacije_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (dgLokacije.CurrentCell.ColumnIndex == 0)
{
MaskedTextBox prodCode = e.Control as MaskedTextBox;
prodCode.Mask = "00000-9999";
}
}
但是我遇到错误Object reference not set to an instance of an object.
在线prodCode.Mask = "00000-9999";