Try this
if (e.Row.RowType = DataControlRowType.DataRow)
{
//Check your condition here
//Get Id from here and based on Id check value in the
//underlying dataSource Row Where you have "Done" column Value
// e.g.
// (gridview.DataSource as DataTable), now you can find your row and cell
// of "Done"
If(Condition True)
{
e.Row.BackColor = Drawing.Color.Red // your color settings
}
}
example code snippet:
protected void EmployeeAvailabilityGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if(Convert.ToBoolean(DataBinder.Eval(e.Row.DataItem, "DONE")))
{
e.Row.BackColor = System.Drawing.Color.LightPink;
}
}
}
catch (Exception ex)
{
//ErrorLabel.Text = ex.Message;
}
}