Null Row Cell in GridView with 'Date' type
<p>I've used rowdatabind code in gridview for expired date alert by colored row those dates already have expired. My table's column ExpDate type is "date". its works well but now the problem is- when any row cell become null, its given error. my gridviewrowDatabound code is- </p>

<pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{

    for (int i = 0; i &lt; GridView1.Rows.Count; i++)
    {
        DateTime date = Convert.ToDateTime(GridView1.Rows[i].Cells[8].Text);
        if (date &lt; DateTime.Now)
        {
            GridView1.Rows[i].BackColor = System.Drawing.Color.Red;
            GridView1.Rows[i].Visible = true;
        }
        else
        {
            GridView1.Rows[i].Visible = false;
        }
    }


}
</code></pre>

<p>Showing error : "String was not recognized as a valid DateTime" , for code line- " DateTime date = Convert.ToDateTime(GridView1.Rows[i].Cells[8].Text);" 
now what can i do. anyone can give me an idea, please!!</p>