Hello:
I have a repeating section with a repeating table. In my repeating table a had a button that launch a windows form that loop through the repeating table and it on the DataGridView in my windows form.
But when I insert a new section and click the button in that new section, it also loop through the first repeating section.
How do I this in code to prevent from looping from other repeating section?
here is my code:
======================================
'Module.VB
Public ClientList as new Datatable()
======================================
'Form Code
Private Sub GetClientList()
If ClientList.Columns.Count = 0 Then
ClientList.Columns.Add("ClientNo")
ClientList.Columns.Add("MatterNo")
ClientList.Columns.Add("Percentage")
Dim dnav As XPathNavigator = MainDataSource.CreateNavigator()
Dim rows As XPathNodeIterator = dnav.Select("/my:ExpenseAccount/my:LLPGroup/my:LLPExpenseGroup/my:ItemExpenseGroup/my:ClientGroup/my:ItemClientGroup", NamespaceManager)
While rows.MoveNext()
Dim ClientNo As String = rows.Current.SelectSingleNode("my:ClientNo", NamespaceManager).Value
Dim MatterNo As String = rows.Current.SelectSingleNode("my:MatterNo", NamespaceManager).Value
Dim Percents As String = rows.Current.SelectSingleNode("my:ExpensePercentage", NamespaceManager).Value
Dim row As DataRow
row = ClientList.NewRow()
row("ClientNo") = ClientNo
row("MatterNo") = MatterNo
row("Percentage") = Percents
ClientList.Rows.Add(row)
End While
End If
End Sub