Change Color of Alternate Rows in the DataGridView



Change Color of Alternate Rows in the DataGridView

C#
private void btnAlternate_Click(object sender, EventArgs e)
        {
            this.dgv.RowsDefaultCellStyle.BackColor = Color.White;
            this.dgv.AlternatingRowsDefaultCellStyle.BackColor = Color.Aquamarine;
        }

No comments:

Post a Comment