Listview Child Form


Author
Message
Mike Tomlin
Mike Tomlin
StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)
Group: StrataFrame Users
Posts: 23, Visits: 5.8K
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



Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.

Mike Tomlin
Mike Tomlin
StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)StrataFrame Beginner (27 reputation)
Group: StrataFrame Users
Posts: 23, Visits: 5.8K
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.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Gotcha...glad you found it.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search