Populate a repeating section from C# code - InfoPath Dev
in

InfoPath Dev

Populate a repeating section from C# code

Last post 10-19-2012 08:37 AM by Hilary Stoupa. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-24-2012 06:38 AM

    Populate a repeating section from C# code

    Hi Im pretty new at this so i need some help. I have a form where i have a field that a user can typ a number in and then hit a button.

    Then the form will start a SQL query and get a Select TOP (Value of Number field) * list from the SQL. This values that i retrive from the SQL query will be stored in arrays.

    So far so good but here comes my problem. Now i need code to populate a repeating section with the values stored in the arrays. And depending how many rows there is in the arrays i need to create matching sections.

    What the form will be used for is this.

    People should be able to open the the form and fill in how many IP-adresses they want and then click the button get IP`S. Then a query in C# will get the number of rows the user typed and store them in arrays. Depending of how many rows in the arrays that was populated by the query i need to create and populate repeating sections. Because now the user will need to type in data in the fields and and hit submit. I hope someone can help me or point me in the right direction

  • 10-19-2012 01:10 AM In reply to

    Re: Populate a repeating section from C# code

    No one that can help me and point me in the right direction here ?
  • 10-19-2012 08:37 AM In reply to

    Re: Populate a repeating section from C# code

    Hi!

    Sorry this went unanswered for so long.

    So, you need to create a new instance of your repeating group and populate it.

    Here are some links that might help you:

    http://msdn.microsoft.com/en-us/library/office/aa945227.aspx
    http://www.infopathdev.com/blogs/hilary/archive/2008/07/04/how-do-i-copy-repeating-data-from-an-external-source-into-my-form.aspx

    Hilary Stoupa

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