I'm hoping someone can help solve this simple sounding problem. I trying to load columns of a Repeating Table
(RT) based on data retrieved from a SQL
Server DB. For the most part this works fine. Numerous textboxes are
loaded into multiple rows in the RT. The problem is that the first column in the
RT is a dropdown box. Only the dropdown in the first row in the RT is
being populated. The dropdowns in the subsequent rows are blank.
With each iteration of the of my loop (code is below) the value that should be
placed into the dropdown on the next row is overlaying the value in the first
row. Any help would be appreciated.
Dim Nav As
XPathNavigator = MainDataSource.CreateNavigator()
Dim parent As XPathNavigator =
MainDataSource.CreateNavigator.SelectSingleNode("/dfs:myFields/dfs:dataFields",
NamespaceManager)
Dim row As XPathNavigator =
MainDataSource.CreateNavigator.SelectSingleNode("/dfs:myFields/dfs:dataFields/d:TimeAndAttendaceView",
NamespaceManager)
Dim i As Int16
Dim rowCount As Int16 =
ds.Tables("Hours").Rows.Count
For i = 0 To rowCount - 1
MainDataSource.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/d:TandAView/@DropDown",
_
NamespaceManager).SetValue(ds.Tables("Hours").Rows(i).Item("DropDownText"))
MainDataSource.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/d:TandAView/@TextBox1",
_
NamespaceManager).SetValue(ds.Tables("Hours").Rows(i).Item("Textbox1Value"))
MainDataSource.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/d:TandAView/@TextBox2",
_
NamespaceManager).SetValue(ds.Tables("Hours").Rows(i).Item("Textbox2Value"))
row.Clone()
If i < ds.Tables("Hours").Rows.Count - 1 Then
parent.AppendChild(row)
End If
Next i