Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/06/2011, 22:20
Avatar de ramirezmario7
ramirezmario7
 
Fecha de Ingreso: febrero-2008
Ubicación: Medellín
Mensajes: 336
Antigüedad: 16 años, 2 meses
Puntos: 56
Respuesta: colorear una fila de datadrig

Hola puedes recorrer el grid y verificar si se cumple la condicion y cambias el color de fondo.

for (int f = 0; f < dataGridView1.Rows.Count; f++)
{
if (Convert.ToInt32(dataGridView1.Rows[f].Cells["precio"].Value) < 10)
dataGridView1.Rows[f].DefaultCellStyle.BackColor = System.Drawing.Color.Blue;
else
if (Convert.ToInt32(dataGridView1.Rows[f].Cells["precio"].Value) >= 25)
dataGridView1.Rows[f].DefaultCellStyle.BackColor = System.Drawing.Color.Red;
}