Utilise l'evenement CellFormatting
Private Sub New_lease_reportDataGridView_CellFormatting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles New_lease_reportDataGridView.CellFormatting If xIsEven(e.RowIndex) True Then e.CellStyle.BackColor Color.Aqua
End Sub
j'ai trouvé cette fonction xIsEven sur le site pour savoir si un nombre est pair, si la ligne index est pair il le colorie la cellule d'une couleur.
Public Function xIsEven(ByVal Number As Long) As Boolean
xIsEven = Not -(Number And 1)
End Function
@+
youpi :)