Problems with Repeating table - InfoPath Dev
in

InfoPath Dev

Problems with Repeating table

Last post 09-09-2008 03:22 PM by karthikl. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-09-2008 03:22 PM

    Problems with Repeating table

    Hi All,

    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

    1. Turn off the "Allow Users to Insert and Delete" 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.

    XPathNavigator ContextNode = this.MainDataSource.CreateNavigator().SelectSingleNode(("/dfs:myFields/dfs:dataFields/d:Maintable" + "[last()]"), NamespaceManager);
                this.CurrentView.SelectNodes(ContextNode);
                this.CurrentView.ExecuteAction(ActionType.XCollectionInsert, "Maintable_15");

    However, this doesnt work because the 'SelectNodes' call in the second line is throwing an exception when i turn off the "Allow users to Insert and Delete" option.

    2. Tried modifyin some attributes in manifest. but no luck

    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 "Allow users to insert and delete" option infopath sets some flag or whatever to make the table static.

    Please help me on this issue

     

     

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.