Infopath 2007 insertrow

B

BobC

I can't get this code (which works in IP 2003) to work in infopath
2007. Any ideas?

Dim nodeRowStart As XPathNavigator =
e.Source.SelectSingleNode("/d:WorkOrders/d:Activity[1]",
NamespaceManager)
If nodeRowStart Is Nothing Then
System.Windows.Forms.MessageBox.Show("nodeRowStart not
valid")

Else

' insert the row insert before will place it on top.


MainDataSource.CreateNavigator().SelectSingleNode("/d:WorkOrders/d:Activity[1]",
NamespaceManager).InsertBefore() ', Type.Missing, Type.Missing) '
select the first row in the list.
'thisXDocument.UI.Alert("Message to user..)


Me.CurrentView.ExecuteAction(ActionType.XCollectionInsertBefore,
"Activity_10")

End If
 

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