Hi,
Hilary provided an example how to add new rows programatically in one of the posts. I adjusted the code accordingly and it works superfine:
Dim xpath As String = "/my:PayPressureForm/my:General/my:NumberOfPeopleCoveredByRequest" Dim field As XPathNavigator = MainDataSource.CreateNavigator().SelectSingleNode(xpath, NamespaceManager) 'get the node you wish to have repeated xpath = "/my:PayPressureForm/my:AdjustBaseSalary" Dim group As XPathNavigator = MainDataSource.CreateNavigator().SelectSingleNode(xpath, NamespaceManager) 'cast the field's value to an int to know how many rows to add Dim rows As Integer = field.ValueAsInt 'loop, cloning group Dim i As Integer For i = 1 To rows - 1 Dim newRow As XPathNavigator = group.Clone() newRow.InsertAfter(group)
Next i
Is there an additional line of code that I could add to first delete all rows?