Make added repeating section show up on top of the list of sections - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Make added repeating section show up on top of the list of sections

Last post 07-28-2013 07:07 AM by Jnellson. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-24-2013 07:56 PM

    Make added repeating section show up on top of the list of sections

    I have a form with a repeating section that has a button that adds the new section via VB. See this post for reference: http://www.infopathdev.com/forums/p/26230/91066.aspx#91066 I would not like the new field to show up on top of the list. Any thoughts? Thanks for any help! Jon
  • 07-27-2013 10:32 PM In reply to

    Re: Make added repeating section show up on top of the list of sections

    Hi Jon,

    In lieu of writing custom code for every coding request, we developed qRules which helps us pay for our time to monitor and respond to this forum.

    All proceeds from qRules go towards paying InfoPath MVPs to respond to this forum.

    And, qRules has an Insert function with a parameter for position (/posn=1) or you can say /before which means insert before (ignored when using /posn).

    Try the trial and remove your custom code. It will save you money in the long run and your purchase goes to support the forum.

    Best,

    Patrick 

    Patrick Halstead
    Project Manager at Qdabra
  • 07-28-2013 07:07 AM In reply to

    Re: Make added repeating section show up on top of the list of sections

    I do like the look of qRules and will look into it for future projects. I have seen it as the answer to many problems on the forums but it is not approved for me to use or a part of my budget.

    For now I am stuck using what comes with InfoPath.

    My current code looks like this:

                //get the parent node for the repeating group
                XPathNavigator parent = MainDataSource.CreateNavigator().SelectSingleNode("/my:StudentNotecard/my:Interactions/my:InteractionList", NamespaceManager);

                //clone a node from Sample Data   
                XmlDocument sampleData = new XmlDocument();
                sampleData.Load(this.Template.OpenFileFromPackage("sampledata.xml"));

                XPathNavigator child = sampleData.CreateNavigator().SelectSingleNode("/my:StudentNotecard/my:Interactions/my:InteractionList/my:InteractionsList", NamespaceManager).Clone();

                //append the node
                parent.AppendChild(child);

    I appreciate any help.

     Jon

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