Leonard,Take a look at the StrataFlix to see how this is handled by the SF team with more details.
Basically you have to check the rules in the Child Form before returning to the parent form. Here is a sample code I use in all my child forms:
Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click
'-- This code uses' the form's PrimaryBusiness Object instance to check the validations.
If Me.PrimaryBusinessObject.CheckRules(True) Then
DialogResult = Windows.Forms.DialogResult.OK
Else
'-- Show a custom InfoBox to alert the end user of the broken rules.
Dim CountOfBrokenRulesCurrentRow As Integer = Me.PrimaryBusinessObject.BrokenRules.Count
Dim CountOfBrokenRulesAdditionalRows As Integer = 0
Dim CountOfBrokenRulesTotal As Integer = Me.PrimaryBusinessObject.BrokenRules.Count
MicroFour.StrataFrame.Messaging.InfoBox.ErrorBox(MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(Me.BrokenRulesAlertTitleKey, Me.BrokenRulesAlertTitle), String.Format(MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(Me.BrokenRulesAlertTextKey, Me.BrokenRulesAlertText), CountOfBrokenRulesCurrentRow, CountOfBrokenRulesAdditionalRows, CountOfBrokenRulesTotal), Me)
End If
End Sub
Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click DialogResult = Windows.Forms.DialogResult.Cancel
End Sub
As you can see, the code is petty generic, so I can simply copy/paste in every child form I need. Also, I added code to show the InfoBox effect you see when using the Form's Save().