<?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 : how to make EntityAspect.EntityState become modified?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : how to make EntityAspect.EntityState become modified?</description>
  <pubDate>Tue, 28 Apr 2026 15:06:00 -700</pubDate>
  <lastBuildDate>Mon, 29 Jun 2009 13:27:03 -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=1349</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>how to make EntityAspect.EntityState become modified? : Try DataSourceUpdateMode; here...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1349&amp;PID=4873#4873</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 29-Jun-2009 at 1:27pm<br /><br />Try DataSourceUpdateMode;&nbsp; here are some words from the IdeaBlade Classic Reference Help:<DIV></DIV><DIV><DIV =Secti&#111;n1><H6><FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT></H6><P =Ms&#111;normal>Before we leave the discussion of the ControlBindingDescriptor’s validation-related behavior, let’s take a look at one more of the ControlBindingDescriptor’s properties: <B><FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT>, </B>a property inherited from the System.Windows.Forms.Binding class.&nbsp; By default this is set to <I><FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT>.OnValidation</I>, meaning that the value of the bound business object property won’t be updated until the Validating event fires for the control.&nbsp; There are occasions when you might want it to be updated differently.&nbsp; Another member of the <FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT> enum, <I>OnPropertyChanged</I>, causes the business object property to get updated with each change of the value in the control.&nbsp; With that setting, the business object will get updated with each new keystroke typed into a TextBox, or with each new item selected as you scroll through the items in a ComboBox.</P><P =Ms&#111;normal>Here’s one scenario where the latter behavior would be useful:&nbsp; Suppose your Employee form displays each Employee’s Manager in a ComboBox. But suppose it also displays the Manager’s photo and organizational title in other controls.&nbsp; Normally, as your end user scrolled through potential Managers in the ComboBox list, the related Photo and Title would remain unchanged.&nbsp; They would not change until the user actually tabbed or clicked into some control other than the ComboBox, thereby causing the latter’s Validating event to fire.&nbsp; But you might want your user to see each prospective Manager’s photo and title as she moved through the ComboBox list.&nbsp; By setting the <FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT> for the ComboBox’s ControlBindingDescriptor to <I>OnPropertyChanged</I>, you would get the desired behavior.</P><P =Ms&#111;normal>Another scenario using the <I>OnPropertyChanged</I> setting for the <FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT> might be a TextBox where you want to validate the entered value as each keystroke is entered.&nbsp; If commas had no place in the value, you could stop the user in her tracks as soon as she entered one. For most circumstances this constitutes carrying the principle of immediate feedback maybe a little far, but you may have a use case where it makes sense.</P><P =Ms&#111;normal><FONT style=": #316ac5" color=#ffffff>DataSourceUpdateMode</FONT> has one more setting: <I>Never.</I>&nbsp; This can be used to turn off data binding temporarily without disturbing the configuration of the bindings.</P><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Now, here is some code from an IdeaBlade Classic&nbsp;VB project using DevExpress controls:</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>unitCBM.Descriptors.Get(originCustomerLookUpEdit).DataSourceUpdateMode = _DataSourceUpdateMode.OnPropertyChanged</DIV></DIV></DIV><DIV><P>unitCBM.Descriptors.Get(originAddressLookUpEdit).DataSourceUpdateMode = _DataSourceUpdateMode.OnPropertyChanged</P><P>&nbsp;</P></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 29 Jun 2009 13:27:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1349&amp;PID=4873#4873</guid>
  </item> 
  <item>
   <title>how to make EntityAspect.EntityState become modified? : I&amp;#039;m using a XtraGridView...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1349&amp;PID=4857#4857</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=454" rel="nofollow">monkeyking</a><br /><strong>Subject:</strong> 1349<br /><strong>Posted:</strong> 25-Jun-2009 at 5:49pm<br /><br />I'm using a XtraGridView to bind with an datasouce, the problem is, once i change a cell value, the EntityAspect.EntityState can not detect the changes unless I move the focus into other cells. what i want is, once i change the cell value, the EntityAspect.EntityState can be set into modified immediatly without moving focus, so i'm able to save it. <br><br>there is a bit problem in the saving feature, once i close the window, i want to save the changes, but because EntityAspect.EntityState doesn't change, so i can't do it. but the thing makes me confuse abt is that it works if I just save it without closing that window and the&nbsp; EntityAspect.EntityState can be set into modified, but if I save it during closing window, it doesn't work.<br><br>Regards<br>John<br><br><br>]]>
   </description>
   <pubDate>Thu, 25 Jun 2009 17:49:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1349&amp;PID=4857#4857</guid>
  </item> 
 </channel>
</rss>