public void productsGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int unitsInStock = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "UnitsInStock"));
if (unitsInStock == 0)
e.Row.BackColor = Color.Yellow;
}
}
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int unitsInStock = Convert.ToInt32(DataBinder.Eval(e.Row.DataItem, "UnitsInStock"));
if (unitsInStock == 0)
e.Row.BackColor = Color.Yellow;
}
}