This is a migrated thread and some comments may be shown as answers.

Highlight the null cell in RadGridView

0 Answers 187 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fadi
Top achievements
Rank 1
Fadi asked on 26 Nov 2012, 01:21 PM
Hi, I have a radGridView, the user inserts rows, i want to highlight the cell with null values.  For example to make the back  color of the cell Red.
I have tried the below code, but it did not work...

Inside a button

for (int j = 0; j < radGridView1.Rows.Count; j++)
 {
      if (radGridView1.Rows[j].Cells[4].Value.ToString() == "")
      {
             radGridView1.Rows[j].Cells[4].Style.ForeColor = Color.Red;           
      }
}

So how to do it? or if there is a better highlight method that notifies the user for the empty cell.

Thanks in advance

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Fadi
Top achievements
Rank 1
Share this question
or