<?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 : Process for creating new Base View?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Process for creating new Base View?</description>
  <pubDate>Wed, 10 Jun 2026 04:15:42 -700</pubDate>
  <lastBuildDate>Tue, 25 Sep 2007 17:23:29 -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=443</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>Process for creating new Base View? : tx. I am out until next Monday....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1337#1337</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 5:23pm<br /><br />tx. I am out until next Monday. But I will give it a shot then.<DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 17:23:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1337#1337</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Yeah.  It turns out that in...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1335#1335</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> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 5:14pm<br /><br />Yeah.<DIV>&nbsp;</DIV><DIV>It turns out that in CommonEntity (in IdeaBlade.Common.EntityModel) there are three methods:</DIV><DIV>&nbsp;</DIV><DIV>AllowCreate()</DIV><DIV>AllowUpdate()</DIV><DIV>AllowDelete()</DIV><DIV>&nbsp;</DIV><DIV>By default the first two return true and the third returns false.&nbsp; You can override these in your entity classes (or in BaseEntity)&nbsp;to control what is allowed and disallowed.&nbsp; In them you could place whatever logic you want&nbsp;to determine if the operation&nbsp;should proceed.&nbsp; Your presenter or controller logic can also invoke them before carrying out an operation.</DIV><DIV>&nbsp;</DIV><DIV>If you simply override AllowDelete() in your UserRole entity and return true you'll be able to delete.</DIV><DIV>&nbsp;</DIV><DIV>Sorry not to have this sooner.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 17:14:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1335#1335</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : tx. That worked. A   Any idea...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1326#1326</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 10:44am<br /><br />tx. That worked. A<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Any idea about the delete?</DIV>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 10:44:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1326#1326</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : I think Bill C. is right; it&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1324#1324</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> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 10:37am<br /><br />I think Bill C. is right; it's a problem with the wrong persistence manager.<DIV>&nbsp;</DIV><DIV>In my update to the LayoutDemo app posted earlier in this thread, the UserSecurityCode&nbsp;entity has a static Create() method that doesn't accept a persistence manager:</DIV><FONT size=2><P></FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2> newItem = </FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>.Create(currentUser, selectedRole);</P><DIV></DIV><DIV>Inside this create method is the line:</DIV><FONT size=2><P></FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2> assoc = </P><P>pUser.PersistenceManager.CreateEntity&lt;</FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>&gt;();</P><DIV></DIV><DIV>As you can see, it uses the persistence manager it retrieves from the User entity.&nbsp; I suggest you try this.</DIV><DIV>&nbsp;</DIV><DIV>Within pages whose page controller inherit from PageController&lt;entitytype&gt;, the persistence manager is wrapped in an EntityManager that assists in maintaining synchrony between multiple views without round trips to the persistence server.&nbsp; Again in my earlier post on this thread, I retrieve the initial UserSecurityCodes with:</DIV><DIV><FONT size=2><P></FONT><FONT color=#008080 size=2>RdbQuery</FONT><FONT size=2> query = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>RdbQuery</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>), </FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>.UserIdEntityColumn, </FONT><FONT color=#008080 size=2>EntityQueryOp</FONT><FONT size=2>.EQ, user.Id);</P><P>list = EntityManager.PersistenceManager.GetEntities&lt;</FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>&gt;(query, pStrategy);</P><DIV>It is on this persistence manager that SaveChanges() will be called when Save is selected.</DIV><DIV>&nbsp;</DIV><DIV>Hope this helps.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV></FONT></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 10:37:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1324#1324</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : You may have to implement your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1322#1322</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> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 9:52am<br /><br /><P>You may have to implement your own save/delete routines for the triple-pane layout that you created.&nbsp; I suppose you could somehow wiggle into the context of the parent layout, but that'll take some work, too.&nbsp; Hopefully, the big guns will weigh in on this again someday.</P><span style="font-size:10px"><br /><br />Edited by Linguinut - 25-Sep-2007 at 9:56am</span>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 09:52:36 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1322#1322</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : The problem is that I am not controlling...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1321#1321</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 9:47am<br /><br />The problem is that I am not controlling the save button. It is in the PageView control.<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 09:47:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1321#1321</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : I don&amp;#039;t think there is only...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1319#1319</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> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 9:41am<br /><br />I don't think there is only one persistence manager involved.&nbsp; I vaguely remember Ward saying something in training one time about a pm per view, or something like that.&nbsp; Is it possible that you are calling the save on a pm that does not have the changes that you made?&nbsp; Just a thought...you probably already checked that, though.]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 09:41:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1319#1319</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : My code: And it says nothing to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1318#1318</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 8:45am<br /><br />My code: And it says nothing to save:<DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// Add a new Role to the Parent User</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;/summary&gt;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void AddRole()</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Role mSelectedRole = (Role)ActionViewContext.RolesBindingSource.Current;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User mUser = (User)ActionViewContext.ParentBindingSource.Current;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserRole newUserRole = UserRole.Create(MainPm.Manager, mUser, mSelectedRole);</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActionViewContext.UserRolesBindingSource.Add(newUserRole);</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// Delete the currently selected UserRole</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// &lt;/summary&gt;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void DeleteRole()</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UserRole selectedUserRole = ActionViewContext.UserRolesBindingSource.Current as UserRole;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (selectedUserRole != null)</DIV><DIV style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; selectedUserRole.Delete();</DIV><DIV style="MARGIN: 0in 0in 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV></DIV>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 08:45:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1318#1318</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : I can now move from one grid to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1317#1317</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 8:27am<br /><br /><P>I can now move from one grid to the other. But when I save an added UserRole it says nothing to save, as it did before. Then as you know the delete gives an error.</P><P>Why would it be saying&nbsp; nothing to save?</P>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 08:27:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1317#1317</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : I meant ActionViewContext </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1315#1315</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 7:28am<br /><br />I meant ActionViewContext]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 07:28:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1315#1315</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : ActionViewPresenter methods are...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1314#1314</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 25-Sep-2007 at 7:27am<br /><br />ActionViewPresenter methods are all static correct? <span style="font-size:10px"><br /><br />Edited by orcities - 25-Sep-2007 at 7:27am</span>]]>
   </description>
   <pubDate>Tue, 25 Sep 2007 07:27:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1314#1314</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : When doing the UserSecurityCode.Create()...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1309#1309</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 24-Sep-2007 at 5:02pm<br /><br />When doing the UserSecurityCode.Create() why don't you have to pass then Persistence Manager?]]>
   </description>
   <pubDate>Mon, 24 Sep 2007 17:02:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1309#1309</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : First:  In my LayoutDemo application,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1306#1306</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> 443<br /><strong>Posted:</strong> 24-Sep-2007 at 3:35pm<br /><br />First:<DIV>&nbsp;</DIV><DIV>In my LayoutDemo application, I populated the UserRolesBindingManager with:<FONT color=#008080 size=2></DIV><P>IList</FONT><FONT size=2> list = pParent.GetChildren&lt;</FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>&gt;(</FONT><FONT color=#008080 size=2>EntityRelations</FONT><FONT size=2>.User_UserSecurityCode, pStrategy);</P><DIV></DIV><P>You'll note that GetChildren() returns an array of UserSecurityCode objects--a fixed length list.&nbsp; Instead, we need to perform a query:</P><DIV></DIV><FONT size=2><P></FONT><FONT color=#008080 size=2>EntityQuery</FONT><FONT size=2> query = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>EntityQuery</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>), </FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>.UserIdEntityColumn, </FONT><FONT color=#008080 size=2>EntityQueryOp</FONT><FONT size=2>.EQ, user.Id);</P><P>list = EntityManager.PersistenceManager.GetEntities&lt;</FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>&gt;(query, pStrategy);</P><DIV></DIV>to get a managed EntityList.<DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Second:</DIV><DIV>&nbsp;</DIV><DIV>In the Add() method of the ActionViewPresenter, I tried to add the selected Role directly to the UserRole BindingList.&nbsp; That won't work, since they're of different entity types.&nbsp; We need to create a new UserRole ("UserSecurityCode" in the LayoutDemo model) entity&nbsp;using its Create() method and add THAT to the binding source:</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2><P></FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2> newItem = </FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>.Create(currentUser, selectedRole);</P><P>mUserRolesBindingSource.Add(newItem);</P><DIV>The "selectedRole" is just the current item in the RolesBindingManager.</DIV><DIV>&nbsp;</DIV><DIV>The current user is the current item in the parent binding manager but&nbsp; unfortunately, the parent binding manager isn't available in the ActionViewPresenter.&nbsp; You could either pass it in via the ActionViewContext, or move the Add and Remove logic out to the UserRolesTabViewController and pass a reference to IT in the ActionViewContext.</DIV><DIV>&nbsp;</DIV><DIV>In&nbsp;Remove() we need to actually remove the UserSecurityCode entity from the PM:</DIV><DIV><FONT size=2><P></FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2> selectedUserRole = mUserRolesBindingSource.Current </FONT><FONT color=#0000ff size=2>as</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>UserSecurityCode</FONT><FONT size=2>;</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (selectedUserRole != </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>)</P><P>{</P><P>selectedUserRole.Delete();</P><P>}</P><DIV>That updates the UserRolesBindingSource and the grid automatically.</DIV><DIV>&nbsp;</DIV><DIV>In my version I can save additions of user roles OK, but I also get the "Validation Issue" message when I try to save a deletion.&nbsp; I'll investigate that further.</DIV><DIV>&nbsp;</DIV><DIV>Hope this helps.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</FONT></FONT></DIV></DIV></DIV></FONT></FONT>]]>
   </description>
   <pubDate>Mon, 24 Sep 2007 15:35:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1306#1306</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : **Please read edits to previous...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1297#1297</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 24-Sep-2007 at 9:12am<br /><br /><DIV>**Please read edits to previous post</DIV>]]>
   </description>
   <pubDate>Mon, 24 Sep 2007 09:12:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1297#1297</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Updates in Red I appreciate your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1295#1295</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 24-Sep-2007 at 8:03am<br /><br /><DIV><FONT color=#ff0000><strong>Updates in Red</strong></FONT></DIV><DIV>I appreciate your help. That worked. </DIV><DIV>&nbsp;</DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>But I am still having one issue. When I go to add. It does not add the UserRole to the grid. <FONT color=#ff0000>UserRole.Create(MainPm.Manager, User, Role))</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT color=#ff0000>Update: I understand this adds it to the cache. Since it didn't show I tried to add it to the BindingSource as well and I get the following error: Collection was of fixed size.</FONT></DIV><DIV>&nbsp;</DIV><DIV>When I go to delete it the action seems to work, but the grid is not updated. <FONT color=#ff0000>((UserRole)UserRoleBindingSource.Current).Delete();</FONT></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Then when I save after deleting it tells me I can't "You are not allowed to delete LOC.CEMS.Model.UserRole.</DIV><DIV>&nbsp;</DIV><DIV>When I try and save after an add it says there is nothing to save. </DIV><DIV>But when I hit add a second time on the same role it gives me a foreign key conflict error.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#ff0000>It doesn't seem to hit the Refresh for the TabController after an action has take place.</FONT></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by orcities - 24-Sep-2007 at 9:11am</span>]]>
   </description>
   <pubDate>Mon, 24 Sep 2007 08:03:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1295#1295</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Try this (terminology is from...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1280#1280</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> 443<br /><strong>Posted:</strong> 21-Sep-2007 at 2:08pm<br /><br />Try this (terminology is from my LayoutDemo app):<DIV>&nbsp;</DIV><DIV>Add fields to the ActionViewContext for the RoleBindingSource and UserRoleBindingSource.&nbsp; Set these in the UserRolesTabViewController (be sure both binding sources are created before creating the ActionViewContext).</DIV><DIV>&nbsp;</DIV><DIV>Then you'll have access to them in the ActionViewPresenter (from the Context property).&nbsp; &#091;You can override OnContextSet() so you know when the context is available&#093;.</DIV><DIV>&nbsp;</DIV><DIV>EntityBindingSources expose a Current property that is the current selected item.&nbsp; They also expose a CurrentItemChanged event.&nbsp; With these and the events from the Add and Remove buttons in the view, the ActionViewPresenter should be able to implement the functionality you need.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Fri, 21 Sep 2007 14:08:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1280#1280</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : I believe, but I am not sure,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1277#1277</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 21-Sep-2007 at 1:44pm<br /><br />I believe, but I am not sure, that I get the context of the grid ok. But I can not reference any of the grids properties. LIke the selected rows. <DIV></DIV><DIV></DIV>]]>
   </description>
   <pubDate>Fri, 21 Sep 2007 13:44:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1277#1277</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Excellent example. Thanks.  The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1264#1264</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 21-Sep-2007 at 9:31am<br /><br />Excellent example. Thanks. <DIV>The only question I have now is:</DIV><DIV>&nbsp;</DIV><DIV>How do I know what is selected by the Roles Grid in the ActionView?</DIV><DIV>&nbsp;</DIV><DIV>I have tried to look at other examples, like the SimpleSearch Widget, but can't find an example that works.</DIV><DIV>&nbsp;</DIV><DIV>You mentioned passing an object through the Context. I assume you can do that with the parameters value of the ViewFactory.Add method. </DIV><DIV>&nbsp;</DIV><DIV>But how do you get the value back out?</DIV><span style="font-size:10px"><br /><br />Edited by orcities - 21-Sep-2007 at 10:27am</span>]]>
   </description>
   <pubDate>Fri, 21 Sep 2007 09:31:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1264#1264</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Bill, I really appreciate it....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1263#1263</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 21-Sep-2007 at 7:10am<br /><br />Bill, I really appreciate it. The modules provided with the Cabana project were very simply and it was hard to see how to extend to a new view.<DIV>&nbsp;</DIV><DIV>I am looking through the code now. I might have some questions later but right now I am ok. </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>I really appreciate all your help on this.</DIV>]]>
   </description>
   <pubDate>Fri, 21 Sep 2007 07:10:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1263#1263</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Hi Dan and Bill (and anyone else...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1262#1262</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> 443<br /><strong>Posted:</strong> 20-Sep-2007 at 8:13pm<br /><br />Hi Dan and Bill (and anyone else reading this thread),<DIV>&nbsp;</DIV><DIV>In order to offer better guidance, I needed to get some experience with what you're trying to do myself.&nbsp; My earlier advice to start with the MasterDetail view and tab view controller&nbsp;was a bit bogus...it's much easier to start with a simple view and work up.<DIV>&nbsp;</DIV>After a conversation with Ward, I constructed a three-panel layout like the one you're trying to create and made a specialized version populated with grids and a button control.</DIV><DIV>&nbsp;</DIV><DIV>The results are available at:</DIV><DIV>&nbsp;</DIV><DIV><a href="http://www.IdeaBlade.com/Friends/LayoutDemo.zip" target="_blank">www.IdeaBlade.com/Friends/LayoutDemo.zip</A></DIV><DIV>&nbsp;</DIV><DIV>Note:&nbsp; Ward has promised to put it up in the Friends area tonight.&nbsp; If it's not there by tomorrow morning, ask.</DIV><DIV>&nbsp;</DIV><DIV>It's a standard wizard-generated Cabana project that should build and run.&nbsp; (You may need to adjust the connection string in IdeaBlade.ibconfig.)&nbsp; If you run it, be sure to navigate through the various users--only some of them have UserSecurityCodes configured.&nbsp; Also, my grid builders are very primitive--displaying the Name property only.</DIV><DIV>&nbsp;</DIV><DIV>My earlier advice to start with the MasterDetail view and tab view controller&nbsp;was a bit bogus...it's much easier to start with a simple view and work up.</DIV><DIV>&nbsp;</DIV><DIV>You're on exactly the right track in creating the ThreePanel view and adding names to WorkspaceNames and ViewNames.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>As you can see, the only logic in my ThreePanelView layout view is to get the sub view ids from the&nbsp;context (which it gets from the presenter)&nbsp; and assign them to the SmartPartPlaceHolders.&nbsp; (These are unique ids for the instances of the grid and action views.)</DIV><DIV>&nbsp;</DIV><DIV>The ThreePanelView presenter has no special purpose logic at all.</DIV><DIV>&nbsp;</DIV><DIV>The only complexity is in the ThreePanelViewTabViewController.&nbsp; I simply inherit from the base TabViewController and override a few methods.</DIV><DIV>&nbsp;</DIV><DIV>It creates a context for the layout view, but delegates its configuration to the child class in ConfigureThreePanelViewContextCore().&nbsp; There are also three properties that supply unique ids for the child views.</DIV><DIV>&nbsp;</DIV><DIV>My child class is UserRolesTabViewController, added to the page's TabViewControllers collection at the usual place&nbsp;in the PageController.&nbsp; It simply creates a context for each sub view and adds it to the workitem, then uses the ViewFactoryService to add the view to the workitem.&nbsp;&nbsp; (I added registration of the views with the ViewFactoryService to the ModuleController.)</DIV><DIV>&nbsp;</DIV><DIV>I provided some very basic data sources for the two grids.</DIV><DIV>&nbsp;</DIV><DIV>The ActionView is just a placeholder with two buttons.&nbsp; I could field the click events in the view, invoke methods on the presenter, and either do the updates there or invoke methods on the ActionViewContext (or some object passed in the context) to update the entities.</DIV><DIV>&nbsp;</DIV><DIV>This process clarified for me the process of creating a layout view and adding child views to it.&nbsp; It's all done by adding contexts and views to the workitem, then supplying the unique view ids to the SmartPartPlaceholders.</DIV><DIV>&nbsp;</DIV><DIV>Let me know if this helps get&nbsp;you back on the air.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 20 Sep 2007 20:13:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1262#1262</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Available: will be all roles in...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1253#1253</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 20-Sep-2007 at 1:22pm<br /><br />Available: will be all roles in the database (Role Grid)<DIV>Action:&nbsp;Buttons to add and delete user roles </DIV><DIV>Assigned: all the users currently assigned roles (Role Grid) of UserRole</DIV><DIV>&nbsp;</DIV><DIV>Users - UserId ...</DIV><DIV>UserRole - UserId, RoleId</DIV><DIV>Role - RoleId ...</DIV><DIV>&nbsp;</DIV><DIV>I do wish for them to be in sync.</DIV><DIV>&nbsp;</DIV><DIV>That is exactly what I am trying to do.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 20 Sep 2007 13:22:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1253#1253</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : You&amp;#039;re definitely on the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1252#1252</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> 443<br /><strong>Posted:</strong> 20-Sep-2007 at 1:18pm<br /><br /><P>You're definitely on the right track.&nbsp; I'm actually working on your problem myself as well.</P><DIV>The tab controller for your ThreePanel view composes and manages the&nbsp;display of sub views&nbsp;(the easy part), but also must handle synchronization of the data sources for the sub views&nbsp;(the tricky part).&nbsp; This requires a clear understanding of the sub views' binding sources and their relation to the main binding source of the layout view.</DIV><DIV></DIV>I need to understand the entity relationships involved.<DIV>&nbsp;</DIV><DIV>1.&nbsp; The ThreePanel view will be displayed in a tab in the detail portion of a Summary/Detail or Search/Summary/Detail page whose root entity is "User".&nbsp; Correct.</DIV><DIV>&nbsp;</DIV><DIV>2.&nbsp; What entity type will be displayed in each of the three sub views (Available, Assigned, and Action)?&nbsp;&nbsp; Role?</DIV><DIV>&nbsp;</DIV><DIV>3.&nbsp; What is the relationship between the entities displayed in each sub view?&nbsp; A child relation of User?</DIV><DIV>&nbsp;</DIV><DIV>4.&nbsp; You want the subviews to stay "in sync" with each other and with the main summary view as you navigate between users, right?</DIV><DIV>&nbsp;</DIV><DIV>What is the application functionality you're trying to achieve?&nbsp; Are you trying to manage the roles assigned to users (a many-to-many relationship) by displaying two lists and using buttons to move items from the available to the assigned list?</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Thu, 20 Sep 2007 13:18:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1252#1252</guid>
  </item> 
  <item>
   <title>Process for creating new Base View? : Is this correct? Below is the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1242#1242</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 443<br /><strong>Posted:</strong> 20-Sep-2007 at 11:01am<br /><br /><DIV><strong><FONT size=5>Is this correct?</FONT></strong></DIV><DIV>Below is the process I used to create a new base view and add views/controls to that view. </DIV><DIV>&nbsp;</DIV><DIV>Goal View: Has Three SmartPartPlaceholders on it.</DIV><DIV>TopPlaceHolder -&gt; will hold grid view</DIV><DIV>MiddlePlaceHolder -&gt; will hold action buttons</DIV><DIV>BottomPlaceHolder -&gt; will hold current values</DIV><DIV>&nbsp;</DIV><DIV>1. Create View Class and add to &lt;Business&gt;.&lt;App&gt;.Foundation.Views</DIV><DIV>&nbsp;&nbsp; ThreePaneView.cs</DIV><DIV>2. Add SmartPartPlaceholders</DIV><DIV>3. In View Constructor add method call: <FONT size=2>SetSmartPartPlaceHolderNames();</FONT></DIV><DIV><FONT size=2>4. Build <FONT size=2>SetSmartPartPlaceHolderNames(); method:</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> SetSmartPartPlaceHolderNames() {</FONT></FONT></DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><FONT size=2><FONT color=#008000 size=2>// Critical! Must set SmartPartPlaceHolder name immediately or mysterious exception during create.</FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>mAvailableSmartPartPlaceholder.SmartPartName = </FONT><FONT color=#2b91af size=2>WorkspaceNames</FONT><FONT size=2>.AvailableSmartPartPlaceholder;</FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>mActionSmartPartPlaceHolder.SmartPartName = </FONT><FONT color=#2b91af size=2></FONT></FONT></DIV><DIV><FONT size=2><FONT color=#2b91af size=2>WorkspaceNames</FONT><FONT size=2>.ActionSmartPartPlaceholder;</FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>mAvailableSmartPartPlaceholder.SmartPartName = </FONT><FONT color=#2b91af size=2>WorkspaceNames</FONT><FONT size=2>.AssignedSmartPartPlaceholder;</FONT></FONT></DIV></BLOCKQUOTE><DIV><FONT size=2><FONT size=2>}</FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>5. Add reference to Placeholders in&nbsp;&nbsp;&lt;Business&gt;.&lt;App&gt;.Interface.Constants.Workspaces</FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>6. </FONT></FONT></DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><FONT size=2><FONT size=2><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> AvailableSmartPartPlaceholder = </FONT><FONT color=#a31515 size=2>"AvailableSmartPartPlaceholder"</FONT><FONT size=2>;</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> AssignedSmartPartPlaceholder = </FONT><FONT color=#a31515 size=2>"AssignedSmartPartPlaceholder"</FONT><FONT size=2>;</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> ActionSmartPartPlaceholder = </FONT><FONT color=#a31515 size=2>"ActionSmartPartPlaceholder"</FONT><FONT size=2>;</FONT></FONT></FONT></DIV></BLOCKQUOTE><DIV><FONT size=2><FONT size=2><FONT size=2>7. Create Grid View to place in <FONT color=#a31515>"AssignedSmartPartPlaceholder"</FONT><FONT size=2>;</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2>8. Create UserRolesGridView displays Roles that are assigned to User in the UserRoles Entity.</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2>9. Create TabController - ManageUserRolesTabControl</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2>10. Add/Modify CreateView() method to get data and show control</FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>override</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> CreateView(){</FONT></FONT></FONT></FONT></DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><FONT size=2><FONT size=2><FONT size=2><FONT size=2>mBindingSource =</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>EntityBindingSource</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#2b91af size=2>Role</FONT><FONT size=2>), EntityManager, mEmptyList, </FONT><FONT color=#2b91af size=2>String</FONT><FONT size=2>.Empty);</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2><FONT size=2>ViewId = </FONT><FONT color=#a31515 size=2>"UserRolesGridView"</FONT><FONT size=2>;</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2><FONT color=#008000 size=2>//Choose DetailRoleGrid</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2><FONT color=#2b91af size=2>IGridBuilderService</FONT><FONT size=2> pGridBuilderService = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.WorkItem.Services.Get&lt;</FONT><FONT color=#2b91af size=2>IGridBuilderService</FONT><FONT size=2>&gt;();</FONT></FONT></FONT></FONT></DIV><DIV><FONT size=2><FONT size=2><FONT size=2><FONT color=#2b91af size=2>GridBuilderBase</FONT><FONT size=2> pGridBulderProtoType = pGridBuilderService.Get(</FONT><FONT color=#a31515 size=2>"DetailRole"</FONT><FONT size=2>);&nbsp;</DIV><P></FONT><FONT color=#2b91af size=2>GridViewContext</FONT><FONT size=2> detailRoles = </FONT><FONT color=#2b91af size=2>GridViewContext</FONT><FONT size=2>.AddNew(WorkItem, ViewId, mBindingSource);</P><DIV>detailRoles.GridBuilderPrototype = pGridBulderProtoType;</DIV><DIV></FONT><FONT color=#008000 size=2>//CreateView&lt;UserRolesGridView&gt;(); //Just adds the grid to page</FONT><FONT size=2></DIV></FONT><FONT color=#008000 size=2><FONT color=#2b91af size=2><P>UserRolesGridView</FONT><FONT color=#000000 size=2> mAssignedView = WorkItem.SmartParts.AddNew&lt;</FONT><FONT color=#2b91af size=2>UserRolesGridView</FONT><FONT size=2><FONT color=#000000>&gt;();</P><DIV><FONT size=2>AssignedWorkspace.Show(mAssignedView);</FONT></DIV></BLOCKQUOTE><DIV></FONT></FONT></FONT><FONT size=2>}</FONT></DIV><DIV><FONT size=2>11. Get the ThreePanelView Control's SmartPart Placeholder<BR></FONT><FONT size=2><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>IWorkspace</FONT><FONT size=2> ActionWorkspace{</FONT></FONT></DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><FONT size=2><FONT color=#0000ff size=2>get</FONT><FONT size=2>{ </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> WorkItem.Workspaces&#091;</FONT><FONT color=#2b91af size=2>WorkspaceNames</FONT><FONT size=2>.ActionSmartPartPlaceholder&#093;; </FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>}</DIV></BLOCKQUOTE><P>}</P><DIV></DIV><P>&nbsp;</P><P>I either run into a problem with binding. </P><DIV>The item type of the BindingSource that you selected &#091;LOC.CEMS.Model.User&#093; does not match&nbsp; the BoundType of this BindingManager &#091;LOC.CEMS.Model.Role&#093;.</DIV><DIV>&nbsp;</DIV><DIV>Or if I try to add a control with user type just to see if it works I get:</DIV><DIV>Value cannot be null.<BR>Parameter name: id</DIV><DIV>&nbsp;</DIV><DIV>In the GridViewPresenterBase class. Funny thing is I am not trying to bind any grid.</DIV><DIV>Altered CreateView() as such. ActionButtonView just has 2 buttons on it. And to get it to run to this point I changed the boundtype to be User.</DIV><DIV><FONT color=#0000ff size=2><P>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>override</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> CreateView(){</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV></FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2><P>ActionButtonsView</FONT><FONT color=#000000 size=2> mActionButtonView = WorkItem.SmartParts.AddNew&lt;</FONT><FONT color=#2b91af size=2>ActionButtonsView</FONT><FONT size=2><FONT color=#000000>&gt;();</FONT></P></FONT></FONT><FONT size=2>ActionWorkspace.Show(mActionButtonView);</DIV></BLOCKQUOTE><DIV></FONT><FONT size=2>}</DIV></FONT></DIV><DIV></DIV></FONT></FONT></FONT></FONT></FONT><span style="font-size:10px"><br /><br />Edited by orcities - 20-Sep-2007 at 11:04am</span>]]>
   </description>
   <pubDate>Thu, 20 Sep 2007 11:01:36 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=443&amp;PID=1242#1242</guid>
  </item> 
 </channel>
</rss>