在DataGridVIew事件中添加: if (this.dataGridView1.Rows.Count != 0) { for (int i = 0; i < this.dataGridView1.Rows.Count; ) { this.dataGridView1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(235, 245, 255); i += 2; } }