<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Problems with Repeating table</title><link>https://www.infopathdev.com:443/forums/thread/32124.aspx</link><pubDate>Tue, 09 Sep 2008 22:22:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32124</guid><dc:creator>karthikl</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32124.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=32124</wfw:commentRss><description>&lt;p&gt;Hi All, &lt;/p&gt;
&lt;p&gt;I have problems handling the infopath repeating table for a specific case. I have connected my infopath form to an access database. The repeating table displays all the information from the database. The form allows users to insert and delete rows to the table. The insert option works perfect. However the remove rows option removes the entry from the database directly when i submit the form. Thats the problem. I do not want the delete or CUT operation in the shortcut menu to remove my entries from the database. To solve this i tried two things&lt;/p&gt;
&lt;p&gt;1. Turn off the &amp;quot;Allow Users to Insert and Delete&amp;quot; option so that the shortcut menu doesnt get displayed. I only need the insert functionality. So wrote a event handler for that as pasted below.&lt;/p&gt;
&lt;p&gt;XPathNavigator ContextNode = this.MainDataSource.CreateNavigator().SelectSingleNode((&amp;quot;/dfs:myFields/dfs:dataFields/d:Maintable&amp;quot; + &amp;quot;[last()]&amp;quot;), NamespaceManager);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.CurrentView.SelectNodes(ContextNode);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.CurrentView.ExecuteAction(ActionType.XCollectionInsert, &amp;quot;Maintable_15&amp;quot;);&lt;/p&gt;
&lt;p&gt;However, this doesnt work because the &amp;#39;SelectNodes&amp;#39; call in the second line is throwing an exception when i turn off the &amp;quot;Allow users to Insert and Delete&amp;quot; option.&lt;/p&gt;
&lt;p&gt;2. Tried modifyin some attributes in manifest. but no luck&lt;/p&gt;
&lt;p&gt;Is there any way to get rid of delete and cut option in the repeating table short cut menu and keep only the insert option. (OR) Is there a way to get rid of the shortcut menu itself and write code to insert rows. Apparently, when i turn off the &amp;quot;Allow users to insert and delete&amp;quot; option infopath sets some flag or whatever to make the table static. &lt;/p&gt;
&lt;p&gt;Please help me on this issue&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>