I assume this is ASP.NET. Try this:
protected void Your_GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i = 0; i < e.Row.Cells.Count; i++)
{
if (e.Row.Cells[i].Text == " ")
{
e.Row.Cells[i].Text = "not available";
}
}
}
}
Regards...