﻿<?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?)  » I Have error when started my form</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 07 Apr 2026 18:27:46 GMT</lastBuildDate><ttl>20</ttl><item><title>I Have error when started my form</title><link>http://forum.strataframe.net/FindPost18700.aspx</link><description>[code]&lt;br&gt;
UIException&lt;br&gt;
  Dynamically populating the ListView failed.  Could not create and fill the business object of type 'GoLiveCorporate.sysPedidoCompraItemBO'&lt;br&gt;
TargetInvocationException&lt;br&gt;
  Uma exceção foi acionada pelo destino de uma chamada.&lt;br&gt;
BusinessLayerException&lt;br&gt;
  The ParentBusinessObject property must be set before FillByParent can be called with no parameters supplied.&lt;br&gt;
&lt;br&gt;
Source     : MicroFour StrataFrame UI&lt;br&gt;
&lt;br&gt;
Stack Trace: &lt;br&gt;
   em MicroFour.StrataFrame.Business.BusinessLayer.FillByParent()&lt;br&gt;
   em System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&amp; sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)&lt;br&gt;
   em System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)&lt;br&gt;
   em System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)&lt;br&gt;
   em System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)&lt;br&gt;
   em MicroFour.StrataFrame.UI.Windows.Forms.ListView.GetFilledBusinessObject(Object[] Parameters)&lt;br&gt;
   em MicroFour.StrataFrame.UI.Windows.Forms.ListView.PopulateListView(Object[] Parameters)&lt;br&gt;
   em MicroFour.StrataFrame.UI.Windows.Forms.ListView.InitializeObject()&lt;br&gt;
   em MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()&lt;br&gt;
   em MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)&lt;br&gt;
   em System.Windows.Forms.Form.OnCreateControl()&lt;br&gt;
   em System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;br&gt;
   em System.Windows.Forms.Control.CreateControl()&lt;br&gt;
   em System.Windows.Forms.Control.WmShowWindow(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.Control.WndProc(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.Form.WmShowWindow(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.Form.WndProc(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp; m)&lt;br&gt;
   em System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;br&gt;
[/code]&lt;br&gt;
&lt;br&gt;
[code] PopulationDataSourceSettings = sysPedidoCompraItemBO.FillByParent() [/code]</description><pubDate>Fri, 22 Aug 2008 16:18:34 GMT</pubDate><dc:creator>Rafael</dc:creator></item><item><title>RE: I Have error when started my form</title><link>http://forum.strataframe.net/FindPost18708.aspx</link><description>You did not provide the parameter needed in the ListPopulating event.&amp;nbsp; You selected a method which requires a parameter, this parameter must be supplied in the ListPopulating event.&amp;nbsp; There are a lot of samples on how to do this including the StrataFlix sample found here: &lt;A href="http://forum.strataframe.net/FindPost18186.aspx"&gt;http://forum.strataframe.net/FindPost18186.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is also a sample called Advanced List Population and others as well as a lot of documentation explaining how to do this.&amp;nbsp; But if you are like me, I prefer to look at samples first.&amp;nbsp; I recommend taking a look at the StrataFlix sample as this will cover the most ground all around including how to populat a ListView.&lt;/P&gt;&lt;P&gt;As a side note, you are not going to want to use the FillByParent method inside of the ListView.&amp;nbsp; More than likely you will want to call the FillByParentPrimaryKey or possibly the CopyDataFrom methods if you already have another BO with data within it.&amp;nbsp; &lt;/P&gt;&lt;P&gt;But in short, please refer to the samples to see how to properly set this up.&amp;nbsp; Thanks.</description><pubDate>Fri, 22 Aug 2008 16:18:34 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: I Have error when started my form</title><link>http://forum.strataframe.net/FindPost18707.aspx</link><description>Rafael,&lt;br&gt;
&lt;br&gt;
There are two things you need to do to use the FillByParent:&lt;br&gt;
&lt;br&gt;
- The sysPedidoCompraItemBO must be configured with a parent child relationship. This is done once for the BO in the designer of that BO (i.e. not for an instance dropped on the form).&lt;br&gt;
&lt;br&gt;
- You must supply the instance of the parent to the instance of sysPedidoCompraItemBO on any form that will use that relationship.&lt;br&gt;
&lt;br&gt;
The second can be done in a couple of ways. The easiest is to just set it for the instance dropped on the form. This of course means that an instance of the parent must be dropped on the form also.&lt;br&gt;
&lt;br&gt;
The other is to just supply an instance of the parent to FillByParent.&lt;br&gt;
&lt;br&gt;
Hope that makes sense. If not, just ask some more questions!</description><pubDate>Fri, 22 Aug 2008 16:16:21 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>