<?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>Insert row to table in non-Current view without cloning Row</title><link>https://www.infopathdev.com:443/forums/thread/71493.aspx</link><pubDate>Fri, 28 Oct 2011 15:15:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71493</guid><dc:creator>bblanke</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71493.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=71493</wfw:commentRss><description>I&amp;#39;m having the issue that when I clone a row and insert it, it is populated with the cloned row data.&lt;br /&gt;
&lt;br /&gt;
This works if it were in the same view:&lt;br /&gt;
this.CurrentView.ExecuteAction(ActionType.XCollectionInsert, &amp;quot;group4_50&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code works, but then I need to blank out fields:&lt;br /&gt;
                XPathNavigator group = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:FrontendProcesses/my:FrontendFiles[&amp;quot; + where + &amp;quot;]&amp;quot;, NamespaceManager);&lt;br /&gt;
                XPathNavigator NewRow = group.Clone();&lt;br /&gt;
                for (int h = 0; h &lt;br /&gt;
                    if (where == &amp;quot;last()&amp;quot;)&lt;br /&gt;
                        NewRow.InsertAfter(group);&lt;br /&gt;
                    else&lt;br /&gt;
                        NewRow.InsertBefore(group);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please let me know if you have any suggestions to how I can add a row in a different view similar to how the first set of code above works.&lt;br /&gt;
&lt;br /&gt;
Thank you</description></item></channel></rss>