반응형 [C# 기초] 간단한 DataGridView 값에 따른 Row Background Color 변경 예제 DataGridView 의 특정 Row의 Color를 변환 하는 간단한 예제입니다. Rows.Add 로 값을 추가하고 현재 Row에 BackColor 값을 줍니다. int i = 0; foreach (Match s in vals) { .... 중략 .... DataGridView1.Rows.Add(IAddress, IName, IType, IPhonNumer); if (IType == "1") { DataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.AliceBlue; } i++; } 위 소스에서 IType 가 "1" 일 경우 DataGridView1에 Add로 추가된 Row에 BackColor 을 AliceBlue 로 설정하게 됩니다. Google 검색해.. 2020. 5. 27. 이전 1 다음