<?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 : Problem saving</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Problem saving</description>
  <pubDate>Wed, 29 Jul 2026 06:11:53 -700</pubDate>
  <lastBuildDate>Mon, 25 Oct 2010 20:54:40 -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=2261</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>Problem saving : I am loading a child grid with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2261&amp;PID=8919#8919</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=875" rel="nofollow">alindzon</a><br /><strong>Subject:</strong> 2261<br /><strong>Posted:</strong> 25-Oct-2010 at 8:54pm<br /><br />I am loading a child grid with data based on changing the current row on the parent grid.&nbsp; It is working fine until an edit needs to be saved.&nbsp; The code executed when the page is loaded, or the row is changed is<DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>private</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>void</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> link_load(</FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>object</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> sender)</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> query = </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Global</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.mgr.ManufacturerLinks.Where(m =&gt; m.ManID == ((Ashlin.Model.</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Manufacturer</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>)(((Telerik.Windows.Controls.</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DataControl</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>)(sender)).CurrentItem)).ManID);</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> op = query.ExecuteAsync();</P><P>op.Completed += (s, args) =&gt; linkgrid.ItemsSource = args.Results;</P><P>}</P><DIV>If attempting to save changes, the parent works fine but the child has this error.</DIV><DIV>Coded 4004</DIV><DIV>ManagedRunTimeError</DIV><DIV>EntityManagerSaveException: unable to update the EntitySet 'ManufacturerLinks' because it has a DefiningQuery and no...</DIV><DIV>&nbsp;</DIV><DIV>If cancel is executed this code works perfectly</DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Global</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.mgr.ManufacturerLinks.EntityManager.RejectChanges();</P><DIV></DIV><DIV>The parent data is handled by a viewmodel and repository.&nbsp; The child data is retrieved in the code behind using the code above.</DIV><DIV>&nbsp;</DIV><DIV>It is my workaround since I am still unable to grasp passing arguments to a repository.&nbsp;</DIV><DIV>&nbsp;</DIV></FONT></FONT></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 25 Oct 2010 20:54:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2261&amp;PID=8919#8919</guid>
  </item> 
 </channel>
</rss>