Try this...Hope it help
private void dataGridView1_CellValidating(object sender,
DataGridViewCellValidatingEventArgs e)
{
string headerText =
dataGridView1.Columns[e.ColumnIndex].HeaderText;
if (!headerText.Equals("ColumnName")) return;
if (string.IsNullOrEmpty(e.FormattedValue.ToString()))
{
dataGridView1.Rows[e.RowIndex].ErrorText =
"Column Name must not be empty";
e.Cancel = true;
}
}
Happy Coding...........