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

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()