First you must subscribe to DataGrid CellFormatting event like this:
dataGrid1.CellFormatting += new DataGridViewCellFormattingEventHandler(dataGrid1_CellFormatting);
And then in the event handler do something like this:
void dataGrid1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
if (this.dataGrid1.Rows[e.RowIndex].Cells["cellToCheck"].Value != null)
{
if ((int)this.dataGrid1.Rows[e.RowIndex].Cells["cellToCheck"].Value <=35)
{
this.dataGrid1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Red;
}
}
}
Hope that helps