﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » MaintenanceFormToolStrip control behavior</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 16 Sep 2026 17:02:27 GMT</lastBuildDate><ttl>20</ttl><item><title>MaintenanceFormToolStrip control behavior</title><link>http://forum.strataframe.net/FindPost11810.aspx</link><description>Hi All,&lt;P&gt;I have a SF form with two related business objects,&amp;nbsp;a MaintenanceFormToolStrip for parent BO and a ThemedToolStrip for the child BO.&amp;nbsp; (See image attached)&lt;/P&gt;&lt;P&gt;When I click the &lt;FONT style="BACKGROUND-COLOR: #ffff11"&gt;"Add"&lt;/FONT&gt; button of the ThemedToolStrip to&amp;nbsp;call the CustomersBuildingsAddressBO1.Add(), the MaintenanceFormToolStrip&amp;nbsp;buttons state&amp;nbsp;will change, like I would have clicked the &lt;FONT style="BACKGROUND-COLOR: #ffff11"&gt;"New"&lt;/FONT&gt; button in that toolstrip.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;[codesnippet]Here is the code for the Add button:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; tsiAdd_Click(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; sender &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.Object, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; System.EventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; tsiAdd.Click&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CustomersBO1.Count &amp;gt; 0 &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CustomersBuildingsAddressBO1.Add()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.txtBuildingStreet.Focus()&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]</description><pubDate>Wed, 03 Oct 2007 10:09:00 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: MaintenanceFormToolStrip control behavior</title><link>http://forum.strataframe.net/FindPost11823.aspx</link><description>Hi Ben,&lt;/P&gt;&lt;P&gt;Yes, you are right, that is exactly what I missed.&amp;nbsp; Setting this property to "PrimaryBuinessObject" changes to the behavior I needed.&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Wed, 03 Oct 2007 10:09:00 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: MaintenanceFormToolStrip control behavior</title><link>http://forum.strataframe.net/FindPost11818.aspx</link><description>Do all of the buttons change state on the MFTS, or just the Save and Undo?&amp;nbsp; 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.</description><pubDate>Wed, 03 Oct 2007 09:32:08 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>