RE:Como pintar las lineas de un Grid
...
Ya van 3 veces preguntado lo mismo o parecido, las 3 respondi, alli te va el codigo:
'CAMBIANDO EL FONDO DE UNA CELDA, DEPENDIENDO DE UN VALOR
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If e.RowIndex < Me.DataGridView1.RowCount - 1 Then
Select Case Me.DataGridView1.Item(1, e.RowIndex).Value.ToString
Case 1
Me.DataGridView1.Rows(e.RowIndex).Cells(0).Style.BackColor = Color.AliceBlue
Case 2
Me.DataGridView1.Rows(e.RowIndex).Cells(0).Style.BackColor = Color.Beige
Case 3
Me.DataGridView1.Rows(e.RowIndex).Cells(0).Style.BackColor = Color.BurlyWood
End Select
End If
End Sub
En select case, pregunta por el valor de la columa 1 (osea la 2da), y de acuerdo a los casos pinta la celda 0 (osea la 1era.)
Salu2.