ใส่สีให้แถวใน DataGridView
ตัวอย่าง
foreach (DataGridViewRow dgvR in dgvGenPlan.Rows) { if (dgvR.Cells["StatusFlag"].Value.ToString() == "OLD") // เงื่อนไขตรวจสอบ { dgvR.DefaultCellStyle.BackColor = Color.Pink; } }