There will be times that you will find yourself wanting to update a particular value in a repeating table and/or populate details based upon a selected row in a repeating table. This can be done fairly easily by code.

Two of the ways that I accomplished this was either through adding a button to a column in the repeating table or on the “Changed” event of the control in the repeating table. In most of my cases, I had a line number for each row, so I just used that value to reference the row, but if you are wanting to pull certain details from that row, you will need to reference the applicable node.

For the button, btnAdd, click event, it only requires you to call the SelectSingleNode of the XPathNavigator to obtain the value needed in the current row.


However, if you are trying to obtain the value from the Changed event of a control in a repeating table, it requires a little more code. One thing to note is that you need to check to see if the row is empty before checking for a value, or the call will throw an null reference error. In this example, I’m calling the changed event on a text control and checking to see if the InnerXML is empty. I use the MoveToParent method of the XPathNavigator to access the sibling of the current field in the row of the repeating table.

*One thing to note, that in the Changed event, the “e” event arg is an XmlEventArgs, which is different then the clicked events (ClickedEventArgs).