<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Copy a row from one repeting table to another</title><link>https://www.infopathdev.com:443/forums/thread/30836.aspx</link><pubDate>Fri, 25 Jul 2008 12:04:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30836</guid><dc:creator>eirike</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30836.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=30836</wfw:commentRss><description>&lt;p&gt;Thansk for answering...&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I have tried the following with my attributes, but get an error in VS, &amp;quot;Error&amp;nbsp;1&amp;nbsp;The name &amp;#39;XDocument&amp;#39; does not exist in the current context&amp;quot;&amp;nbsp;: &lt;/p&gt;
&lt;p&gt;Any Ideas?&lt;/p&gt;
&lt;div class="ForumPostContentText"&gt;
&lt;p&gt;&lt;strong&gt;The following was just written from memory and not tested. There might be some syntax errors in it, but it should give you a good idea of what needs to be done:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;// Get a copy of the main DOM node.&lt;br /&gt;var clone = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:PrimaryDataSource&amp;quot;).cloneNode(true);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;// Clear the main DOM nodes.&lt;br /&gt;XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:PrimaryDataSource&amp;quot;).removeAll();&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;// Copy nodes from 2DS to main DOM.&lt;br /&gt;var nodes = XDocument.GetDOM(&amp;quot;SecondaryDataSource&amp;quot;).selectNodes(&amp;quot;/myFields/dataFields/SecondaryDataSource&amp;quot;); // Note: need to supply the correct namespace per element in this XPath.&lt;br /&gt;foreach(var node in nodes)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;clone.selectSingleNode(&amp;quot;my:Field1&amp;quot;).text = node.selectSingleNode(&amp;quot;Field1&amp;quot;).text;&lt;br /&gt;&amp;nbsp;clone.selectSingleNode(&amp;quot;my:Field2&amp;quot;).text = node.selectSingleNode(&amp;quot;Field2&amp;quot;).text;&lt;br /&gt;&amp;nbsp;clone.selectSingleNode(&amp;quot;my:Field3&amp;quot;).text = node.selectSingleNode(&amp;quot;Field3&amp;quot;).text;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;XDocument.DOM.selectSingleNode(&amp;quot;my:myFields&amp;quot;).appendChild(clone.cloneNode(true));&lt;br /&gt;&lt;/strong&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</description></item><item><title>Re: Copy a row from one repeting table to another</title><link>https://www.infopathdev.com:443/forums/thread/30834.aspx</link><pubDate>Fri, 25 Jul 2008 11:48:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30834</guid><dc:creator>sandhyapati</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30834.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=30834</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you go through&amp;nbsp;below link&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://www.infopathdev.com/forums/t/5373.aspx"&gt;http://www.infopathdev.com/forums/t/5373.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I think it may help you&lt;/p&gt;</description></item><item><title>Copy a row from one repeting table to another</title><link>https://www.infopathdev.com:443/forums/thread/30833.aspx</link><pubDate>Fri, 25 Jul 2008 11:15:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30833</guid><dc:creator>eirike</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30833.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=30833</wfw:commentRss><description>&lt;p&gt;Infopath 2007 / C# / Visual Studio&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I have been rewieving the post in this forum for some days now. But&amp;nbsp;I still don&amp;#39;t get it right.&amp;nbsp;(I am newbie to infopath and programming.)&lt;/p&gt;
&lt;p&gt;My&amp;nbsp;form has two repating tables(A and B). The table A(secondary datasource)&amp;nbsp;is response to a call&amp;nbsp;I make to a webservice. I have added a button to each row called &amp;quot;Add&amp;quot;.&lt;/p&gt;
&lt;p&gt;Table B (main datasourse) has the same fields as the first repeating table + a button called &amp;quot;remove&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I want to be able to &amp;quot;copy&amp;quot; the row from table A to table B with the &amp;quot;Add&amp;quot; Button. And&amp;nbsp;remove rows from table B with the &amp;quot;Remove&amp;quot; Buttons.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Please Help...&lt;/p&gt;</description></item></channel></rss>