Alex Rivera | Logout

Why is my bound DataGridView throwing an "Operation not valid because it results in a reentrant call to the SetCurrentCellAddressCore function" error?

Asked 2011-02-25T07:25:58.117
34

When binding a DataGridView control to a binding source, I'm getting the following error in my application:

Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function

The binding source depends on the data table. And I'm filtering the records from the DataGridView. And I used the dataGridView1_CellValueChanged() event where I'm filtering the DataGridView. But when I was deleting the data from the current cell, this error occurs.

How can I resolve this problem?

Edit
Report

1 Answer

2

I found this exception happened because I had an empty DataGridView.CellValidated sub in my code. Once I deleted that empty sub the error went away.

answered 2013-04-22T18:02:16.607

Your Answer