<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Create Entity</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Create Entity</description>
  <pubDate>Thu, 11 Jun 2026 22:35:10 -700</pubDate>
  <lastBuildDate>Fri, 17 Aug 2007 10:04:50 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=362</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Create Entity : Yes, the controller inherits from...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=942#942</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 17-Aug-2007 at 10:04am<br /><br />Yes, the controller inherits from EntitySearchPageController&lt;Person&gt;.&nbsp; PeopleGridBuilder defined.&nbsp; Problem goes away.<DIV>&nbsp;</DIV><DIV>Thanks.</DIV>]]>
   </description>
   <pubDate>Fri, 17 Aug 2007 10:04:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=942#942</guid>
  </item> 
  <item>
   <title>Create Entity : You&amp;#039;re right, it&amp;#039;s a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=923#923</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 14-Aug-2007 at 4:57pm<br /><br />You're right, it's a big stack trace--Cabana and CAB tend to do that.&nbsp; <DIV>&nbsp;</DIV><DIV>You correctly deduce that the top seven lines or so imply that a DataGridView has bound to the binding source and its ListChanged handler is trying to add a row for the new entity.</DIV><DIV>&nbsp;</DIV><DIV>What does your page look like?&nbsp; Does it have a search capability--i.e., does the page controller inherit from EntitySearchPageController or EntitySearchAndResultsPageController?&nbsp; If so, it probably has a search view at the top incorporating a grid view.&nbsp; If you expand the search view, (small down-arrow button at top right) you'll see it.&nbsp; If you don't have a GridBuilder defined for the Person entity, this grid view will have no columns.&nbsp; That could be causing the problem.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 16:57:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=923#923</guid>
  </item> 
  <item>
   <title>Create Entity : This is probably one of the biggest...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=921#921</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 14-Aug-2007 at 3:33pm<br /><br />This is probably one of the biggest stack traces that I have reviewed.&nbsp; Honestly, I cannot figure out why a call to insert a row into a datagridviewrowcollection is even involved.&nbsp; None of the supplied code (IdeaBlade.Cab.UI)&nbsp;was altered.&nbsp; I am using it as is.&nbsp; <DIV>&nbsp;</DIV><DIV>Somewhere in the CAB/DevForce linkage is a datagridview waiting to be filled with a new row.&nbsp; I just don't know where it&nbsp;exists&nbsp;or where to put it if it needs to exist.</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV>]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 15:33:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=921#921</guid>
  </item> 
  <item>
   <title>Create Entity : &amp;#034; at System.Windows.Forms...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=920#920</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 14-Aug-2007 at 3:26pm<br /><br />"&nbsp;&nbsp; at System.Windows.Forms.DataGridViewRowCollection.InsertInternal(Int32 rowIndex, DataGridViewRow dataGridViewRow, Boolean force)\r\n&nbsp;&nbsp; at System.Windows.Forms.DataGridView.DataGridViewDataConnection.ProcessListChanged(ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.DataGridView.DataGridViewDataConnection.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.BindingSource.InnerList_ListChanged(Object sender, ListChangedEventArgs e)\r\n&nbsp;&nbsp; at System.ComponentModel.BindingList`1.OnListChanged(ListChangedEventArgs e)\r\n&nbsp;&nbsp; at IdeaBlade.Util.BindableList`1.OnListChanged(ListChangedEventArgs pArgs)\r\n&nbsp;&nbsp; at IdeaBlade.Persistence.EntityList`1.OnListChanged(ListChangedEventArgs pArgs)\r\n&nbsp;&nbsp; at IdeaBlade.Util.BindableList`1.InsertItem(Int32 index, T item)\r\n&nbsp;&nbsp; at System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)\r\n&nbsp;&nbsp; at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)\r\n&nbsp;&nbsp; at System.Windows.Forms.BindingSource.Insert(Int32 index, Object value)\r\n&nbsp;&nbsp; at IdeaBlade.Cab.UI.EntityBindingSource.InsertEntity(BindingSource pSource, Entity pEntity, Entity pInsertAfterEntity) in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Source\\Infrastructure.IdeaBlade\\IdeaBlade.Cab.UI\\Miscellaneous\\EntityBindingSource.cs:line 133\r\n&nbsp;&nbsp; at IdeaBlade.Cab.UI.EntityBindingSource.InsertEntity(Entity pEntity, Entity pInsertAfterEntity) in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Source\\Infrastructure.IdeaBlade\\IdeaBlade.Cab.UI\\Miscellaneous\\EntityBindingSource.cs:line 151\r\n&nbsp;&nbsp; at IdeaBlade.Cab.UI.EntityUIController`1.AddNewItemHandler(Object sender, EventArgs`1 e) in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Source\\Infrastructure.IdeaBlade\\IdeaBlade.Cab.UI\\PageControllers\\EntityUIController.cs:line 389\r\n&nbsp;&nbsp; at IdeaBlade.Cab.UI.PageNavigatorAdapter.InvokeClickHandlerWithCurrentObject(EventHandler`1 pHandler, Boolean pReturnIfNoCurrent) in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Source\\Infrastructure.IdeaBlade\\IdeaBlade.Cab.UI\\Miscellaneous\\PageNavigatorAdapter.cs:line 268\r\n&nbsp;&nbsp; at IdeaBlade.Cab.UI.PageNavigatorAdapter.AddNewItemButtonClick(Object sender, EventArgs e) in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Source\\Infrastructure.IdeaBlade\\IdeaBlade.Cab.UI\\Miscellaneous\\PageNavigatorAdapter.cs:line 180\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)\r\n&nbsp;&nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)\r\n&nbsp;&nbsp; at System.Windows.Forms.Control.WndProc(Message&amp; m)\r\n&nbsp;&nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)\r\n&nbsp;&nbsp; at System.Windows.Forms.ToolStrip.WndProc(Message&amp; m)\r\n&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)\r\n&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)\r\n&nbsp;&nbsp; at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n&nbsp;&nbsp; at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)\r\n&nbsp;&nbsp; at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n&nbsp;&nbsp; at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n&nbsp;&nbsp; at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n&nbsp;&nbsp; at System.Windows.Forms.Application.Run(Form mainForm)\r\n&nbsp;&nbsp; at Infrastructure.Shell.ShellApplication.Start() in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Layout\\AspireShell\\ShellApplication.cs:line 117\r\n&nbsp;&nbsp; at Microsoft.Practices.CompositeUI.CabApplication`1.Run()\r\n&nbsp;&nbsp; at Infrastructure.Shell.ShellApplication.RunInDebugMode() in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Layout\\AspireShell\\ShellApplication.cs:line 74\r\n&nbsp;&nbsp; at Infrastructure.Shell.ShellApplication.Main() in C:\\Documents and Settings\\bill\\My Documents\\Visual Studio 2005\\Projects\\AspireTest\\Layout\\AspireShell\\ShellApplication.cs:line 53\r\n&nbsp;&nbsp; at System.AppDomain.nExecuteAssembly(Assembly assembly, String&#091;&#093; args)\r\n&nbsp;&nbsp; at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)\r\n&nbsp;&nbsp; at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()\r\n&nbsp;&nbsp; at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String&#091;&#093; activationCustomData)\r\n&nbsp;&nbsp; at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)\r\n&nbsp;&nbsp; at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()\r\n&nbsp;&nbsp; at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n&nbsp;&nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n&nbsp;&nbsp; at System.Threading.ThreadHelper.ThreadStart()"]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 15:26:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=920#920</guid>
  </item> 
  <item>
   <title>Create Entity : Actually, the code is adding a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=919#919</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 14-Aug-2007 at 3:07pm<br /><br /><P>Actually, the code is adding a new instance of the entity (Person) to the binding list.&nbsp; I suspect the&nbsp; </P><DIV>pSource.Insert(insertPoint, pEntity) </DIV><DIV>&nbsp;</DIV><DIV>call is throwing an exception that is being caught somewhere that thinks you're trying to add an entity to a GridView.</DIV><DIV>&nbsp;</DIV><DIV>Place a breakpoint on the Insert() call and look at the stack trace.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Tue, 14 Aug 2007 15:07:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=919#919</guid>
  </item> 
  <item>
   <title>Create Entity : I am getting back to this issue,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=916#916</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 13-Aug-2007 at 5:53pm<br /><br />I am getting back to this issue, again, this evening.&nbsp; I have briefly reviewed my code&nbsp;and I am not seeing what might be causing this exception to occur.&nbsp; There are no datagridview controls in the module, so no columns or rows need to be added.&nbsp; I would assume by reading the comments in the code that the method is supposed to add an entitybindingsource to the workitem.&nbsp; The error description doesn't seem to correspond to what the method is actually doing.&nbsp; Well, I am still confused on this issue.&nbsp; Can anyone help with this?<DIV>&nbsp;</DIV><DIV>Thanks!</DIV><DIV>Bill</DIV>]]>
   </description>
   <pubDate>Mon, 13 Aug 2007 17:53:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=916#916</guid>
  </item> 
  <item>
   <title>Create Entity : Thanks for the report, Bill. We&amp;#039;ll...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=899#899</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 09-Aug-2007 at 9:44am<br /><br />Thanks for the report, Bill.&nbsp; We'll take a look at this as soon as we can.<DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Thu, 09 Aug 2007 09:44:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=899#899</guid>
  </item> 
  <item>
   <title>Create Entity : Btw, the Person module is my own...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=898#898</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 09-Aug-2007 at 9:07am<br /><br />Btw, the Person module is my own creation within Cabana.&nbsp; Everything works except adding a new entity.&nbsp; Here is the code block from EntityBindingSource.cs in IdeaBlade.CAB.UI&nbsp;within which the error occurs:<DIV><FONT color=#0000ff size=2></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> InsertEntity(BindingSource pSource, Entity pEntity, Entity pInsertAfterEntity) {</FONT></DIV><DIV><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; if</FONT><FONT size=2> ( pSource.DataSource == </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2> || !( pSource.DataSource </FONT><FONT color=#0000ff size=2>is</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>IList</FONT><FONT size=2> ) ) </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2>;</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#2b91af>IList</FONT> list = (<FONT color=#2b91af>IList</FONT>) pSource.DataSource;</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>if</FONT> ( list.IsReadOnly ) <FONT color=#0000ff>return</FONT>; </FONT><FONT color=#008000><FONT size=2>// can't insert</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#008000>&nbsp;&nbsp;&nbsp; </FONT></FONT></DIV><DIV><FONT size=2><FONT color=#008000>&nbsp;&nbsp;&nbsp; </FONT><FONT color=#0000ff>int</FONT> insertPoint = 1 + pSource.IndexOf(pInsertAfterEntity);</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>if</FONT> ( insertPoint &gt; 0 ) {</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>pSource.Insert(insertPoint, pEntity);</FONT></FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; } <FONT color=#0000ff>else</FONT> {</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insertPoint = pSource.Add(pEntity);</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; }</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; pSource.Position = insertPoint;</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV>&nbsp;</DIV><DIV>The red highlighted line is the error maker.&nbsp; What am I missing?</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV>]]>
   </description>
   <pubDate>Thu, 09 Aug 2007 09:07:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=898#898</guid>
  </item> 
  <item>
   <title>Create Entity : The Person module based on the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=892#892</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 362<br /><strong>Posted:</strong> 08-Aug-2007 at 1:16pm<br /><br /><P>The Person module based on the Person table in the tutorial database seems to be working.&nbsp; I can navigate through the data.&nbsp; If I try to delete one of the entities the program appropriately states that I am not allowed to do so (see deletion guard of entity class).&nbsp; If I try to add a new entity, I get the following error:</P><DIV>No row can be added to a DataGridView control that does not have columns. Columns must be added first.</DIV><P>Huh?!?&nbsp; This error comes directly from the EntityBindingSource class in the IdeaBlade.Cab.UI project (a no touchy project).&nbsp; There are no DataGridViews involved in my new Person view.&nbsp; I do not understand why this error is popping up.&nbsp; Makes no sense.</P><P>Bill</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 08 Aug 2007 13:16:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=362&amp;PID=892#892</guid>
  </item> 
 </channel>
</rss>