I have a sharepoint 2010 SPGridview and i want to change its cell color on one condition.My condition is
string strRemoveDollar = e.Row.Cells[12].Text.ToString();
decimal theValue = Convert.ToDecimal(strRemoveDollar);
if (theValue < 17) {
e.Row.Cells[12].BackColor = Color.Red; }
else if (theValue < 10) {
e.Row.Cells[12].BackColor = Color.Green; }
How i accomplish this, where to put code so my cell color gets change on condition provided.