✅ System Exception cannot figure out why it's happening
Hello, I have several DataViewGrids that I am binding data to. I'm binding objects from inside of the solution to the grid. I had no problems when I was making my first DataTable, however, I am getting the attached error once I added my second table.
I have two tables, one that is displaying data from a BindingList of Parts and another that is displaying data from a BindingList of Products.
I bound my Parts table with the following
I am attempting to bind my Products table with
I should clarify that is a class containing static BindingList and
Both of these are happening in the main.cs (and main form is what is being launched on application start).
When attempting to start the application I get the attached error. If I simply delete those few lines my tables populate correctly but after a few times of restarting the application they get re-created and cause the exception. I'm not sure what's going on and why it's only a problem for the Product, not the Parts?
1 Reply
I think I fixed it? I removed "Products" as a DataMember from the productBindingSource. I'm not sure if this will last or if another exception will be thrown soon. If someone could still explain what's happening that would be awesome. Ideally, I would like to understand why it happened so I know how to deal with similar things in the future.