Adding a new row to a Repeating Table via VB .NET code

J

Janko

Hi all,

I have the following szenario:

while (i <= 5)

For each i Add a new Row in Reapeating Table "/my:myFields/my:Table"

end while


How do I add a row to a repeating table by using code.

Has anyone an idea ?

any help is more then welcome

cheers
Janko
 
J

Janko

Hi guys,
I found the solution on my own ;)

Now I would like to share the code with the compunity for Infopath 2007

Here it comes:

Dim row as XPathNavigator =
MainDataSource.CreateNavigator.SelectSingleNode("/my:myFields/my:group1/my:group2", NamespaceManager)

row.Clone()

Dim parent as XPathNavigator =
MainDataSource.CreateNavigator.SelectSingleNode("/my:myFields/my:group1",
NamespaceManager)

parent.AppendChild(row)


Add this code to a button function (OnClick) and Thats it

Have fun

cheers Janko
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top