Instead of using ErrorProvider, you can use the DataGridView built-in functionality
A DataGridViewCell has an ErrorText property, you can use it to show the error message.
What you have to do is, you handle the CellValidating event and if fails the validation, you set the error text property, and you get that red error icon to show up in the cell.
private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
if (Your Validation) //Your custom validation
this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = "Error";
e.Cancel = true; //will prevent user from leaving cell, you can decide that yourself.
MaheshNaraayanan, if this helps please login to Mark As Answer. | Alert Moderator