private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex > -1)
{
int intGrade = Convert.ToInt32(this.dataGridView1.Rows[e.RowIndex].Cells["dgvAge"].Value);
if (intGrade ==30)
{
dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Red;
}
else if(intGrade==25)
{
dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Brown;
}
}
}