Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

Dynamic Root List - Editable Root's Editable Child List not saving via DataGridView

$
0
0

Hi,

I’m developing a Winforms app using .NET 4.5 and CSLA 4.5.

I’ve have a Dynamic Root List that has Editable Root objects with an Editable Child list.

I’ve have two DataGridViews bound to the same binding source with the second DataGridView’s data member set to the child list.

Selecting an Editable Root from Grid 1 displays the children as expected in Grid two.  Inserting child records or updating existing child records in Grid 2 only seem to persist when I select a different Editable Root from Grid 1.

If I refresh the Dynamic Root List before selecting a different Editable Root the amendments to the child records are lost.

If I add a new Editable Root and Editable Children refreshing the Dynamic Root List will persist the Editable Root but not the children, they just disappear.

Calling EndEdit on the grids before refreshing the Dynamic Root List doesn’t change the result.  Creating a separate binding source for Grid 2 and binding that to the first binding source made no difference either.

If I call SaveItem from the Dynamic Root List it will save the children, however I was hoping not to have to manually do that.

Do you have any suggestions as to why the Editable Child list is not saving when the Editable Root does?

Your help is greatly appreciated.

Kind regards

 

Nathan


Viewing all articles
Browse latest Browse all 764

Trending Articles