解决思路一:
private void dgvChargeList_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
bool handle;
if (dgvChargeList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.Equals(DBNull.Value)) handle = true;
else
{
handle = false;
e.Cancel = handle;
}
}
解决思路二:
设置属性ShowCellErrors=false;
博客内容主要用于日常学习记录,内容比较随意,如有问题,还需谅解!!!

浙公网安备 33010602011771号