Hi,
In our application, we have created one BindingList say aList. Whenever, users click on the checkbox in a grid, that record (defined object) gets added to this list. Suddenly without any changes to this code, whenever the list is updated for first time, say we add an item to this list, it is throwing below exception message. It adds an item to the list but still it throws the exception. For subsequent addition it does not through an exception. Similarly whenever we try to clear the list, it re-throws the exception. Any help will be appreciated.
Let me know if you need any details.
Thanks,
Amey
Code snippet:
private readonly BindingList<IBcd> aList; // i tried removing readonly but still issue persists
aList = new BindingList<IBcd>();
aList.add(x); // throws exception for first time
aList.clear(); // throws exception for first time
Hi Amey,
Is this list bound to the grid? Does the exception occur when the list is not bound?
Can you provide a full call stack and details for this exception, and can you provide a reproduction sample? Please let us know.
Hi Mike,
This list is not bound to any grid. It is used to store items that are bound to grid. Whenever user clicks on a particular column of a row, that row gets added to this list for further processing.
I am not sure if I can provide you with call stack or any screenshot because of our firm policies.
I'm not sure what could be causing this exception. It seems unlikely that the grid is causing this, since it has no connection to the BindingList. Does any issue occur if items are added to the BindingList in another way that does not go through the grid? Is there any issue if items that are not on the grid are added to the BindingList?
If you are able to provide a reproduction sample, I can take a look and see what might be going wrong.