What you can do is check the columns for NULL or empty in RowDataBound() event of GridView and hide the columns accordingly. In the event method check first for DataRow like this and repeat for other columns
if (e.Row.RowType == DataControlRowType.DataRow)
{
string vToCheck = e.Row.Cells[0].ToString();
if(string.IsNullorEmpty(vToCheck) )
{
gridView.Columns[0].Visible = false;
}
}