B
BobC
I have code that works in InfoPath 2003:
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.
Me.CurrentView.ExecuteAction("XCollectionInsertBefore",
"Activity_10")
End If
This no longer works in 2007.
The updated line
Me.CurrentView.ExecuteAction(ActionType.XCollectionInsertBefore,
"Activity_10")
The specified bstrAction value for the View.ExecuteAction call is not
applicable for the current selection.
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.
Me.CurrentView.ExecuteAction("XCollectionInsertBefore",
"Activity_10")
End If
This no longer works in 2007.
The updated line
Me.CurrentView.ExecuteAction(ActionType.XCollectionInsertBefore,
"Activity_10")
The specified bstrAction value for the View.ExecuteAction call is not
applicable for the current selection.