2016-07-06 2 views

Antwort

2
foreach (TableCell cell in e.Row.Cells) 
{ 
    if (e.Row.RowType == DataControlRowType.DataRow) 
    { 
     string text = cell.Text.Trim(); 
     cell.BackColor = (String.IsNullOrEmpty(text) || text == " ") ? Color.Red : Color.White; 
    } 
}