Add rows to two repeating tables simultaneously - InfoPath Dev
in

InfoPath Dev

Add rows to two repeating tables simultaneously

Last post 08-16-2015 07:40 AM by Eliad. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-16-2015 07:40 AM

    • Eliad
    • Not Ranked
    • Joined on 01-01-2014
    • Posts 1

    Add rows to two repeating tables simultaneously

     

    Add rows to two repeating tables simultaneously

     

    Hi I need to add rows to two repeating tables simultaneously ,I have managed to do it with some code and a button click .

     

    But the problem is when I add a new row it places the new raw above and “pushes” the first raw below .

     

    I have tried all kind of tricks and rules but it doesn’t help .

     

    I also need to copy a value from repeating table to another but as soon as the value is copied it is erased  .

     

    Here is my code :

     

        public void InternalStartup()

            {          

                ((ButtonEvent)EventManager.ControlEvents["CTRL45_45"]).Clicked += new ClickedEventHandler(CTRL45_45_Clicked);

                ((ButtonEvent)EventManager.ControlEvents["CTRL47_45"]).Clicked += new ClickedEventHandler(CTRL47_45_Clicked);

            }

                public void CTRL45_45_Clicked(object sender, ClickedEventArgs e)

            {

               XPathNavigator Group = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:group6/my:Table", NamespaceManager);

                XPathNavigator newRow = Group.Clone();

                 XPathNodeIterator rows = Group.Select("/my:myFields/my:group6/my:Table", NamespaceManager);

                 newRow.InsertAfter(Group);

                  rows.Current.SelectSingleNode("/my:myFields/my:group6/my:Table/my:field16", NamespaceManager).SetValue(" ");

             

               XPathNavigator Group2 = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:group8/my:group9", NamespaceManager);

                XPathNavigator newRow2 = Group2.Clone();

                 newRow2.InsertAfter(Group2);

     

     

            }

     

          public void CTRL47_45_Clicked(object sender, ClickedEventArgs e)

           {

             

            }

        }

    }

     

    Can you please help ?

     

    Thanks Eliad

     


     

     

    Description: Think before you print.Think before you print.

    This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

    For corporate legal information go to:
    http://www.cisco.com/web/about/doing_business/legal/cri/index.html

     

     

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