0

I get the following exception about 1 in 100 times. It does nothing to hinder my program at all from what I can see. What I need is the code to help me suppress this message or handle it myself, I have tried everything I have read in both help and searches and I can't seem to figure it out. So if anyone can help me out thanks in advance.

This is the error message.

The following exception occurred in your DataGridView:

System.InvalidOperationException: BindingSource cannot be its own data source. Do not set the DataSource and DataMember properties to values that refer back to BindingSource.
at System.Windows.Forms.BindingSource.get_Count()
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.DataGridView.DataGridViewDataConnection.GetError(Int32 boundColumnIndex, Int32 columnIndex, Int32 rowIndex)

To replace this default dialog please handle the DataError event.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by sknake
0

Is your app multithreaded -- do you create a new thread, use a timer, or a background worker? If so then all calls to your grid or its underlying datasource should be .Invoke() 'd instead of running on the non-gui thread.

If i'm way off track then I will wait to see the code you post :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.