[C#] DataGridView 홀수/짝수열 배경색 다르게 지정 > C#

본문 바로가기

C#

[C#] [C#] DataGridView 홀수/짝수열 배경색 다르게 지정

회원사진
하나를하더라도최선을
2022-09-30 14:36 831 0

본문



            for (int i = 1; i < this.Rows.Count; i++)
            {
                if (i % 2 != 0)
                {
                    this.Rows[i].DefaultCellStyle.BackColor = Color.FromArgb(240255240);
                }
                else
                {
                    this.Rows[i].DefaultCellStyle.BackColor = Color.White;
                }
            }

댓글목록0

등록된 댓글이 없습니다.
게시판 전체검색