Number of rows for Repeating Sections - InfoPath Dev
in

InfoPath Dev

Number of rows for Repeating Sections

Last post 04-16-2007 12:48 PM by Shiva. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-10-2007 06:03 AM

    Number of rows for Repeating Sections

    Hello guys,
    I have what is probably a simple question in here:

    - I use one repeating section for the moment
    - How can I choose the number of rows, of this section through the managed code?


    My environement is: VS2005, Framework 1.1, C#, InfoPath 2003.

    Thank you everybody.
  • 04-11-2007 06:43 AM In reply to

    Re: Number of rows for Repeating Sections

    Do you want to know how many rows are currently in the table or do you want to limit the possible number of rows?
  • 04-16-2007 12:48 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Number of rows for Repeating Sections

    Hi,

     If you want to know the number of rows in repeating section use below the code in C#.

    Code:

    // Create XPathNavigator positioned at the root of the main data source.
    XPathNavigator myNav = this.MainDataSource.CreateNavigator();

    XmlNodeList nodeList = myNav.SelectNodes("Repeating Node XPath");

    This will give the number of nodes which are available in specified your xpath node. If you want to limit the repeating section row limit then you can change in myschema.xsd file. In this file you can specify upto how many rows you want insert and change the 'maxOccurs' value 'unbounded' to '8' (Any number) of that repeating section.

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