<?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 : DynamicEntity with expression defined on underlying DataColumn</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : DynamicEntity with expression defined on underlying DataColumn</description>
  <pubDate>Wed, 15 Apr 2026 01:45:55 -700</pubDate>
  <lastBuildDate>Wed, 22 Aug 2007 09:44:49 -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=379</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>DynamicEntity with expression defined on underlying DataColumn : thanks!  </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=379&amp;PID=964#964</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=88" rel="nofollow">labcede</a><br /><strong>Subject:</strong> 379<br /><strong>Posted:</strong> 22-Aug-2007 at 9:44am<br /><br />thanks!]]>
   </description>
   <pubDate>Wed, 22 Aug 2007 09:44:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=379&amp;PID=964#964</guid>
  </item> 
  <item>
   <title>DynamicEntity with expression defined on underlying DataColumn : I&amp;#039;m not really sure when...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=379&amp;PID=963#963</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 379<br /><strong>Posted:</strong> 22-Aug-2007 at 8:58am<br /><br />I'm not really sure when the DataColumn expression is evaluated, so there may be other ways to accomplish this, but here's one way.<DIV>&nbsp;</DIV><DIV>First, be sure to use an EntityList as the data source for the grid and binding manager.&nbsp; </DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Next, you need to fire a PropertyChanged event for the expression property.&nbsp; (Since the DynamicEntity derives from Entity, PropertyChanged will automatically be fired for "simple" properties already.)&nbsp; If you've used something similar to the sample DelegateHolder class in the tutorials, you can take a somewhat inelegant approach and&nbsp;add logic to the Setter method to do this:</FONT></DIV><DIV><FONT size=2><FONT color=#0000ff size=2></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Setter(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> pParent, </FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> pValue) {</FONT></FONT></DIV><DIV><FONT size=2><FONT color=#008080 size=2>&nbsp;&nbsp; DataRow</FONT><FONT size=2> aRow = (</FONT><FONT color=#008080 size=2>DataRow</FONT><FONT size=2>)pParent;</FONT></FONT></DIV><DIV><FONT size=2><FONT size=2>&nbsp;&nbsp; aRow&#091;mColumnName&#093; = pValue;</FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2><FONT size=2>&nbsp;&nbsp; // If Qty or Cost changes, then fire event for calculated Total</DIV><DIV></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp; if</FONT><FONT size=2> (mColumnName == </FONT><FONT color=#800000 size=2>"Qty"</FONT><FONT size=2> || mColumnName == </FONT><FONT color=#800000 size=2>"Cost"</FONT><FONT size=2>)&nbsp;</FONT><FONT size=2>&nbsp;{</FONT></DIV><DIV><FONT color=#008080 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DynamicEntity</FONT><FONT size=2> ent = pParent </FONT><FONT color=#0000ff size=2>as</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>DynamicEntity</FONT><FONT size=2>;</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ent.ForcePropertyChanged(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>PropertyChangedEventArgs</FONT><FONT size=2>(</FONT><FONT color=#800000 size=2>"Total"</FONT><FONT size=2>));</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp; }</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2>&nbsp;</DIV><DIV></DIV><DIV>Since the sample DelegateHolder is meant to be multi-purpose you'll probably want to do some refactoring to come up with a cleaner design than this.</DIV><DIV></FONT>&nbsp;</DIV></FONT>]]>
   </description>
   <pubDate>Wed, 22 Aug 2007 08:58:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=379&amp;PID=963#963</guid>
  </item> 
  <item>
   <title>DynamicEntity with expression defined on underlying DataColumn : When creating my DataTable for...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=379&amp;PID=958#958</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=88" rel="nofollow">labcede</a><br /><strong>Subject:</strong> 379<br /><strong>Posted:</strong> 21-Aug-2007 at 2:03pm<br /><br />When creating my DataTable for the EntityTypeInfo, I have included a DataColumn that has an expression defined (basically the summary of the row values. <br><br>This dynamic entity list is bound to a .NET grid using the DataGridViewBindingManager.&nbsp; I've added ViewDescriptors to the DataGridViewBindingManager (at run-time) so that I can display the data in the associated DataGridView.<br><br>After modifying a cell value, I would expect the Total column to be automatically updated.&nbsp; However, this is not the case.&nbsp; Only when the cell is in focus (selected by the mouse or 'tabbed into') does the value update.&nbsp; How do I work around this?<br>]]>
   </description>
   <pubDate>Tue, 21 Aug 2007 14:03:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=379&amp;PID=958#958</guid>
  </item> 
 </channel>
</rss>