Hi there and Happy new year !
On a repeating table, there is the option to insert a new row after the current row. I am trying to do this in code but cannot get it to work. The reason I am doing it in code is because I am copying values from the current row into the new row. I am trying to use a button to perform this. There is a button on each row, so when the user clicks it, a new row is inserted after that row (not after the last row in the table).
My data source looks like this:
-
myfields
-
NewAssessments
-
NewAssessment
-
Title
-
RiskNo
-
LineNumber
-
RAVersion
-
Year
I have code like the following:
XPathNavigator Group = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:NewAssessments/my:NewAssessment[current()]", NamespaceManager);XPathNavigator newRow = Group.Clone();
newRow.InsertBefore(Group);
Any help would be appreciated. Thank you.