﻿<?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 » Business Objects and Data Access (How do I?)  » Business Objects - User Controls</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 02:18:47 GMT</lastBuildDate><ttl>20</ttl><item><title>Business Objects - User Controls</title><link>http://forum.strataframe.net/FindPost9851.aspx</link><description>Trent helped me out a month or so ago with Business Objects and User Controls and things are working fine but I have came accross another issue which I can't seem to resolve.&amp;nbsp; Here is my scenerio&lt;/P&gt;&lt;P&gt;I have a 'Contact' user control that contains&amp;nbsp;a Grid, Contact Business Object and Business Binding Source.&amp;nbsp;I drop the same Contact BO on my form along with my Contact User control and set the BO Translation property.&amp;nbsp; I populate the Contact BO on my form and set the Usercontrol's bbs.businessOject =&amp;nbsp; my forms Contact BO.&amp;nbsp; THis works fine thanks to Trent.&lt;/P&gt;&lt;P&gt;Now that I have a list of contacts I need the ability to edit contact infomation, without using a child dialog control, so I created a child form to edit contact information.&amp;nbsp; Now how do I&amp;nbsp;translate the BO from my user control to my dialog form and keep the business objects in sync. I tried setting up a manual business object translation between the two but couldn't figure out how to populate the BO on the dialog form. &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Thu, 05 Jul 2007 07:57:46 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Business Objects - User Controls</title><link>http://forum.strataframe.net/FindPost9969.aspx</link><description>Tim,&lt;/P&gt;&lt;P&gt;I had the same issue you just need to forget about drag and drop and set it in code. Here is code out of my&amp;nbsp;contacts user control that I use to pop up a maint form&amp;nbsp;for additional editing. Anyways hope&amp;nbsp;it helps&lt;/P&gt;&lt;P&gt;P&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&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;WithEvents&lt;/FONT&gt;&lt;FONT size=2&gt; ChildFormDialog &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&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; ContactUserControl_ParentFormLoading() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&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;.ParentFormLoading&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ChildFormDialog = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; TranslationItem &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.UI.Windows.Forms.BusinessObjectTranslationItem&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-Configure Translation &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;TranslationItem.DestinationBusinessObject = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"FrmAddress._BoContacts1"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;TranslationItem.SourceBusinessObject = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BOTranslations(0).SourceBusinessObject&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-Add to Child Form Dialog&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ChildFormDialog.BusinessObjectTranslations.AddRange(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.UI.Windows.Forms.BusinessObjectTranslationItem() {TranslationItem})&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;.ChildFormDialog.ChildForm = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"ActionLabor.Payroll.UI.Forms.FrmContactMaintenance"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ChildFormDialog.ParentForm = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ParentForm&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' Handles the Maintenance Button Clicked Event from The ToolBar&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&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; MaintBtnClicked()&lt;/P&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;Not&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;.ChildFormDialog &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Is&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Nothing&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ChildFormDialog.ShowDialog()&lt;/P&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;/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;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 05 Jul 2007 07:57:46 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Business Objects - User Controls</title><link>http://forum.strataframe.net/FindPost9940.aspx</link><description>I tried that. &lt;/P&gt;&lt;P&gt;When you drop a ChildFormDialog on a SF user control you receive an error message 'Invalid FrameWork Container, the object that the ChildFormDialog has been dropped on is not a subclass of MicroFour.StrataFrame.UI.Windows.Forms.BaseForm'.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Tue, 03 Jul 2007 14:24:10 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Business Objects - User Controls</title><link>http://forum.strataframe.net/FindPost9877.aspx</link><description>You should be able to drop the ChildFormDialog on the UserControl itself (in it's designer) and call it's ShowDialog from the form like this:&lt;/P&gt;&lt;P&gt;Me.userControl1.childFormDialog1.ShowDialog()&lt;/P&gt;&lt;P&gt;When you drop it on the UserControl, you should be able to set the translations between the user control and the child form dialog.</description><pubDate>Mon, 02 Jul 2007 08:49:19 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>