General information
Category:
The Mere Mortals .NET Framework
Title:
Winforms - Cannot create child list
Kevin,
I am getting the "Cannot create child list" error, which you have explained previously how to correct.
Here is an answer you gave for this problem a couple of months ago:
*** begin exceprt ***
In a Windows Forms application, you may find that your data, although seemingly saved successfully, never gets saved to the back end. Often the reason for this is the need in Windows Forms/ADO.NET to issue an EndEdit on the current row. In MM .NET you have two main ways to make this happen:
1. Set the business object's AutoEndEdit property to true.
2. Call the form's Save method rather than the business object's SaveDataSet method directly
Setting the business object's AutoEndEdit property to true causes EndEdit to be issued on all rows in a DataTable. Since the EndEdit problem only occurs in Windows Forms, a more efficient option is to call your form's Save method which automatically issues an EndEdit on the current row only.
*** end exceprt ***
I am getting the "child list" error in my Winforms form. However, in my case, the business object whose data is being edited in the datagrid is the child business object to the form's primary business object.
As a result, there is no code in my form that explicitly calls SaveDataSet; the save in the child business object is triggered via MM.NET's normal parent/child plumbing.
So, is your "more efficient" #2 (above) relevant in this case? The save of the primary business object is already triggered by an mmSaveButton, rather than by calling SaveDataSet in code.
Thanks,
Ric
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only