StrataFrame Forum

MaintenanceFormToolStrip control behavior

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

By Edhy Rijo - 10/2/2007

Hi All,

I have a SF form with two related business objects, a MaintenanceFormToolStrip for parent BO and a ThemedToolStrip for the child BO.  (See image attached)

When I click the "Add" button of the ThemedToolStrip to call the CustomersBuildingsAddressBO1.Add(), the MaintenanceFormToolStrip buttons state will change, like I would have clicked the "New" button in that toolstrip.

I was looking for all properties in those toolstrip controls and the BOs, but could not find any property that would may be causing that behavior.  The two BOs are just related, but they work independent of each other, only that I make sure there is a parent record before trying to add a child one.

Here is the code for the Add button:

Private Sub tsiAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsiAdd.Click

If Me.CustomersBO1.Count > 0 Then

Me.CustomersBuildingsAddressBO1.Add()

Me.txtBuildingStreet.Focus()

End If

End Sub

By StrataFrame Team - 10/3/2007

Do all of the buttons change state on the MFTS, or just the Save and Undo?  Most likely, it's caused by the IncludeInFormSave option, which defaults to AllBusinessObjects and causes those buttons to enable/disable when any business object on the form changes.
By Edhy Rijo - 10/3/2007

Hi Ben,

Yes, you are right, that is exactly what I missed.  Setting this property to "PrimaryBuinessObject" changes to the behavior I needed.

Thanks!