Question about setting up a Parent Child Demo...


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
But I cant use the toolstrip that comes with the Maintenance form for the child bo, right?

Not generally... the maintenance form toolstrip calls the methods on the form, which uses the IncludeInForm*** properties to determine which business object(s) to perform the action on.  So, you cannot have multiple MaintenanceFormToolstrips, or they will both do the same thing.

I'll need separate buttons for add, edit, delete, save, undo, and navigation for the grid/child BO, right?

Correct.

If i attempt to navigate away from the parent record, how can i detect if there were changes made in any of the child records and then prompt the user?

Your best bet is to handle the Navigating event of the parent business object and check the IsDirty property on each of the child business objects... if any of them is true, then you should set e.Cancel = True to cancel the navigation away from the current record.

StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Ok, thanks ben.

Now, about the ChildFormDialog... the way that works is you create two separate maintenance forms, one for the parent, one for the child. Both independant of each other and fully functional. Then using this ChildFormDialog you choose which form  you want to use as the child and it will only load those records related to the parent. Right?

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You're correct up until the part about loading the records related to the parent... it doesn't load any records, you have to do that yourself.  What the ChildFormDialog does is allows you to translate business objects between the child form and the parent form so that when the child form launches, it has the exact same business object references as the parent form.  So, you add a record on the child bo, and it shows up in the child business object on the parent form.  So, you can close the child form without having to save the data, because it's in the child business object on the parent form.
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