﻿<?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?)  » Getting the ChildFormDialog to Work</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 14:37:26 GMT</lastBuildDate><ttl>20</ttl><item><title>Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13192.aspx</link><description>The following code (C#, sorry VB.NETers)&amp;nbsp;is setup basically like the CRM sample application's Orders and Items:&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=#2b91af size=2&gt;Boolean&lt;/FONT&gt;&lt;FONT size=2&gt; _NewItem;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; SalesOrderDetails(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt; pIsNewItem)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _NewItem = pIsNewItem;&lt;BR&gt;}&lt;BR&gt;&lt;BR&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;void&lt;/FONT&gt;&lt;FONT size=2&gt; SalesOrderDetails_Load(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (_NewItem)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.mSalesOrderDetails.Add();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#ff1111 size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#ff1111&gt;.mSalesOrderDetails.Edit();&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.mPartTemp.FillByPrimaryKey(mSalesOrderDetails.partindex);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;this&lt;/FONT&gt;&lt;FONT size=2&gt;.mPartTemp.Count &amp;gt; 0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ItemNumTextEdit.Text = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;.mPartTemp.partnum;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RefreshSubtotal(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RefreshUI(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;The red highlighted line is where the application error with a BusinessLayerException stating the following:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;There are no rows in the current data table.&amp;nbsp; An edit is not allowed.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The ChildFormDialog is supposed to take care of passing the BOs to the ChildForm, isn't it?&amp;nbsp; I have the BusinessObjectTranslation setup correctly.&amp;nbsp; My source is the SalesOrder form's SalesOrderDetail BO (mSalesOrderDetails)&amp;nbsp;and the destination is the SalesOrderDetail form's SalesOrderDetail BO (also called mSalesOrderDetails).&lt;/P&gt;&lt;P&gt;Is there something else that I need to do?&amp;nbsp; What am I doing wrong?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Bill</description><pubDate>Fri, 04 Jan 2008 16:12:46 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13263.aspx</link><description>Glad you found your problem :)</description><pubDate>Fri, 04 Jan 2008 16:12:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13250.aspx</link><description>That was the culprit!&amp;nbsp; I had created a "new" BO to do the work of filling the ListView.&amp;nbsp; Why?&amp;nbsp; I don't know.&amp;nbsp; So, I changed it so that the translated BO is being filled, then I use that to complete the ListView.&amp;nbsp; It seems to be working, now.&lt;/P&gt;&lt;P&gt;Thanks a ton for the response!&amp;nbsp; I am very glad to be moving forward again on this project!!&lt;BR&gt;Bill</description><pubDate>Fri, 04 Jan 2008 09:53:27 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13249.aspx</link><description>[quote][b]Ben Chase (01/04/2008)[/b][hr][quote]&lt;SPAN id=ctl02_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl10_lblFullMessage&gt;...&lt;/SPAN&gt;check the .Count of the business object before it's translated.[/quote]&lt;/P&gt;&lt;P&gt;Welcome back, Ben!&amp;nbsp; We'll be gentle.&lt;/P&gt;&lt;P&gt;It is 0.&amp;nbsp; Odd.&amp;nbsp; I am using the same BO (I think)&amp;nbsp;to fill the ListView.&amp;nbsp; There are five records in the ListView (Count: 5).&amp;nbsp; Where did they go?&lt;/P&gt;&lt;P&gt;I am suspecting the RowPopulating event...checking now...</description><pubDate>Fri, 04 Jan 2008 09:45:20 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13248.aspx</link><description>[quote]&lt;SPAN id=ctl02_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl10_lblFullMessage&gt;Let the bombardment begin!&lt;/SPAN&gt;[/quote]&lt;/P&gt;&lt;P&gt;I brought my flak jacket, but I'm not sure that's going to be enough ;)&lt;/P&gt;&lt;P&gt;Well, the first thing we need to do is make sure that the translation is happening correctly.&amp;nbsp; So, verity that before the ChildFormDialog.ShowDialog() is called the business object in question (the one you're calling Edit() on) has at least one record.&amp;nbsp; So put a break point on the ShowDialog() line and use the watch window to check the .Count of the business object before it's translated.</description><pubDate>Fri, 04 Jan 2008 09:13:10 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13245.aspx</link><description>Still looking for help on this...bump.&amp;nbsp; :)</description><pubDate>Fri, 04 Jan 2008 09:09:43 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13218.aspx</link><description>Let the bombardment begin!  :P</description><pubDate>Wed, 02 Jan 2008 12:02:20 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13210.aspx</link><description>&lt;EM&gt;Note to Greg's self&lt;/EM&gt;:&amp;nbsp; Make sure you other self doesn't find out what you're doing late on Fridays!&amp;nbsp; Could be trouble.&lt;/P&gt;&lt;P&gt;I guess the SF developers will have to chime in on this one.&amp;nbsp; I sure hope they are &lt;EM&gt;well rested&lt;/EM&gt;, because we are going to be bombarding them next week! :)&lt;/P&gt;&lt;P&gt;Thanks for responding, Greg!&lt;BR&gt;Bill</description><pubDate>Sat, 29 Dec 2007 13:52:56 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13202.aspx</link><description>I really need to read the entire post before I respond....  :blush: &lt;br&gt;
&lt;br&gt;
I have never use the BrowseDialog or the the ChildDialog, so I'm not going to be much help here (and here I thought I was sooo on top of this one).  Looking at the source code, the translated BO appears to be loaded before the Load event would be called, so any semblance of help I might have offered is, well, useless.  :pinch:&lt;br&gt;
&lt;br&gt;
[i]Note to self:[/i] Just skip answering posts late on a friday...&lt;br&gt;</description><pubDate>Fri, 28 Dec 2007 20:50:19 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Getting the ChildFormDialog to Work</title><link>http://forum.strataframe.net/FindPost13201.aspx</link><description>You need to call Edit after you call the fill method.  The error is simply stating that there is no data in the BO, there for it can't do an edit.  The check to do any time this might occur is:&lt;br&gt;
&lt;br&gt;
[codesnippet]myBO.CurrentRowIndex &lt; 0[/codesnippet]&lt;br&gt;
&lt;br&gt;
I use this a lot to validate that there is a current row before I attempt to do something with it.</description><pubDate>Fri, 28 Dec 2007 20:36:36 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>