void InitializeComponent() {
this.DataGridView.DataError += this.DataGridView_DataError;
}
void DataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) {
e.ThrowException = false;
}
Use this code u will capture the error then perform according to that error.