2010-03-08 5 views

Odpowiedz

9

użyć tej metody na kodzie:

private bool HasErrorText() 
    { 
     bool hasErrorText = false; 
     //replace this.dataGridView1 with the name of your datagridview control 
     foreach (DataGridViewRow row in this.dataGridView1.Rows) 
     { 
      foreach (DataGridViewCell cell in row.Cells) 
      { 
       if (cell.ErrorText.Length > 0) 
       { 
        hasErrorText = true; 
        break; 
       } 
      } 
      if (hasErrorText) 
       break; 
     } 

     return hasErrorText; 
    } 
Powiązane problemy