Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janko - 06 Feb 2007 17:25 GMT
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
Janko - 07 Feb 2007 08:56 GMT
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

> Hi all,
>
[quoted text clipped - 14 lines]
> cheers
> Janko
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.