안녕하세요

C# 초보 개발자입니다.

 

모니터링 프로그램을 만들고 있는데

데이터그리드뷰에서 특정 값을 받았을때

해당 로우만 글자를 깜빡깜빡이는 효과를 주고 싶은데

어떻게 해야될지 모르겠네요...

 

아래 처럼 구현하려고 하니 안되더라구요...ㅠㅠ

 

 

for (int i = 0; i < ds.Tables["AD_HIST"].Rows.Count; i++)
            {
                if (ds.Tables["AD_HIST"].Rows[i]["WARNING_YN"].ToString() == "N")
                {

                    foreach (DataGridViewRow dgvr in dataGridView1.Rows)
                    {
                        if (dgvr.Cells[3].Value.ToString() == "1단계")
                        {
                            for (int j = 0; j < 100; j++)
                            {

                                    dgvr.DefaultCellStyle.BackColor = Color.Yellow;

                                    dgvr.DefaultCellStyle.BackColor = Color.White;
                            }
                        }
                        else if (dgvr.Cells[3].Value.ToString() == "2단계")
                        {
                            dgvr.DefaultCellStyle.BackColor = Color.Orange;
                        }
                        else if (dgvr.Cells[3].Value.ToString() == "3단계")
                        {
                            dgvr.DefaultCellStyle.BackColor = Color.Red;
                        }
                    }
                }
            }