I have filled gridview.In that some cells are blank due to no data were found from datasource.
I want to filled that blank cells with Value 0.
Now after filling datagridview i wrote following code
foreach (DataGridViewRow row in dataGridView1.Rows)
{
foreach (DataGridViewCell celval in row.Cells)
{
if (celval.Value == null)
{
celval.Value = 0;
}
}
}
this code has no error but doesn't worked.
i doesn't filling blank cell with 0.
i have already used break point it checks for if condition but got condition false.
please solve this problem