Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

5. Windows Forms Datagrid

5.53 How can I get rid of the error icon that appears when there is an editing error?


Adam Chester gives this solution in a posting on the microsoft.public.dotnet.framework.windowsforms newgroup.

     DataTable dt = (DataTable)dataGrid1.DataSource;
     foreach(DataRow row in dt.GetErrors())
     {
          row.RowError = "";
          foreach(DataColumn col in dt.Columns)
               row.SetColumnError(col, "");
     }