Hi,

I am experiencing some unexpected behaviour with a windows form that I am trying to create. I have a customer object that has a number of properties and one of those properties is an array of bank accounts.

I have created a datasource for the customer object and then dragged it onto the form as a DataGridView, I have then dragged the BankAccount data member from the datasource onto the form as a DataGridView. Both of the DataGridView are working with the same BindingSource object but the bankaccount grid is working on the BankAccounts data member from the binding source. I am new to 2.0 and so far this seems to make sense to me.

When I run the form I create a new customer row, I can then add data to the bank account grid. Sounds correct so far, I think. When I go to the customer grid view and add another new record as expected the bank account grid changes to show no data, again I would have expected this to happen. The problem is that when I choose the customer that I created first the data is not shown in the datagridview for the bank account. It looks like the data from the bankaccount datagrid does not get assigned to the bankaccount[] member in the customer object. I would have expected this to be handled automatically, am I expecting too much or is there something fundamental that I am doing wrong.

I have been able to get the data to be assigned to the bankaccount[] but I had to write code on a rowleave event of the bankaccount grid view to copy the data from the grid's data source into the customer object. Once I got this to work I then got some other unexpected behaviour as when I selected the first customer, I could see the bank accounts but the grid would not allow me to add a row.

Any ideas are welcome and I could provide some sample code if that helps.

If the question does not make sense please let me know and I will attempt to clarify the problem I am seeing.

Thanks,

Richard