StrataFrame Forum

Listview Child Form

http://forum.strataframe.net/Topic21556.aspx

By Mike Tomlin - 1/16/2009

I have a listview on a form that shows related child records - this works fine and the records in the listview update correctly as the main BO is navigated through. I've added the buttons and settings to add a child record maintenance form via the listview automation. The buttons dim/activate as appropriate and the child form launches but it's never in add or edit mode - it seems it can't find linked records. It has the correct BO (the same BO as the child listview on the main form) and the ChildFormDialogue has a translation set.



I've been going round in circle on this one for some while. Any thoughts where to look for that setting I've obviously forgotten or got wrong.



Thanks



Mike


By Trent L. Taylor - 1/16/2009

but it's never in add or edit mode

When you add a record with the Add method, then the BO is placed in Add mode.  And when you call Edit on a BO, then the BO is placed in Edit mode.  If you have a BO set to ManageUIReadonlyState = False, then the fields will always be accessible and the IsDirtyChanged event will fire when a record is modified.  Also, at a more granular level, when you set the IgnoreManageReadonlyUI property on a control to True, then it will be editable at all times.

That is the quick and dirty version of the editing state and the BOs managing the Readonly (or enabled) state of the controls.  For a quick test here, just set the ManageUIReadonlyState property on the BO to false and see if all of the fields are enabled.  Then you will know that the Edit is not being called.  This should at least help you start troubleshooting the problem.

By Mike Tomlin - 1/16/2009

Found the issue - in the child form I had mistakenly added a default fill routine in the parent form loading which was over-riding the parent-child selection and so never showing the linked record.
By Trent L. Taylor - 1/16/2009

Gotcha...glad you found it.