0
我在处理DataGridView
时遇到错误。我想插入一个单元格内的值时,该单元格是空的,所以我做了一个这样的代码如何处理DataGridView列中的条件?
if (dataGridView1.Rows[RowCount - 1].Cells[1].Value = "")
{
// my statement
}
else
{
// exception statement
}
但我下(dataGridView1.Rows[RowCount - 1].Cells[1].Value = "")
面积得到一个错误,我想我有,如果修改条件,但没有任何线索。任何人都可以帮助我吗?
愤怒的公牛我想,它已经给我一个错误的NullReferenceException是unhanded – Xeroth
@ user3021112:您是否尝试过'的ToString()'如图我的答案? –
是我试过的代码。 – Xeroth