Answered Data Grid View bound to custom object not populating

snetzky

New member
Joined
Apr 8, 2014
Messages
2
Programming Experience
10+
This is driving me nuts, so I'm hoping someone will have an idea of what I might be doing wrong. I have a form that has a data grid view bound to a BatchCollateral collection object as the datasource. The BatchCollateral is a collection that is part of the Batch object.

The Batch object can either be created as a brand new Batch or opened as an existing batch. Now here's the weird part.

1) If i open an existing batch and load the Batch collateral from the database and set the DataGridView's DataSource to the current Batches batch collateral, it works just fine and the dataGridView displays the members.

2) If I open a new batch and then import a file into the database and add those into the batches batch collateral, the datagrid view doesn't display the members, in fact it appears not to see them at all, even though I can see them in the collection just before I run the code that sets the values.

What I'm thinking is that somehow the values of the batch collateral are being buried somewhere, but I'm having a very hard time figuring it out.

Larry
 
Solved my own problem.

Never mind...I found out I updated a new variable instead of a member variable which meant the properties were never getting updated, hence no values.
 
Back
Top