If DataGridView1.Rows.Count <> 0 Then
For i As Integer = 0 To DataGridView1.Rows.Count - 1
If (i Mod 2) = 0 Then
DataGridView1.Rows(i).DefaultCellStyle.BackColor = System.Drawing.Color.LightGreen
Else
DataGridView1.Rows(i).DefaultCellStyle.BackColor = System.Drawing.Color.LimeGreen
End If
Next
End If
全站熱搜
留言列表