如果table或datagridview中的一个数据为空,我将它填为其他值怎么做
我用过 if (dataGridView1.Rows[0].Cells[0].Value.ToString().Length <1)
if (dataGridView1.Rows[0].Cells[0].Value.ToString()=="" )
if (dataGridView1.Rows[0].Cells[0].Value.ToString()==null )
都无效
我用过 if (dataGridView1.Rows[0].Cells[0].Value.ToString().Length <1)
if (dataGridView1.Rows[0].Cells[0].Value.ToString()=="" )
if (dataGridView1.Rows[0].Cells[0].Value.ToString()==null )
都无效
{
dataGridView1.[0].Cells[0].Text="test";
}
{
dataGridView1.Rows[0].Cells[0].Text="test";
}
{
datatable1.Row[0][0] = "test";
}