After I was able to successfully filter the data with the code in the related case, I tried to move to the next record with the code below but running into some problems.
I'm getting error:
'CmbRec' has a SelectedIndex which is invalid because it does not exist in the list of items.
Parameter name: value
on Line: CmbRec.SelectedIndex = Val(Subnode1.InnerText) - 1
Dim NodeCount As Integer = LinkStream.SelectNodes("Root/Link").Count
If (NodeNumber < NodeCount) Then
NodeNumber += 1 'Move to some next node
Dim node As XmlNode = LinkStream.SelectSingleNode("Root/Link[" & NodeNumber & "]")
Dim Subnode1 As XmlNode = node.ChildNodes(0)
Dim Subnode2 As XmlNode = node.ChildNodes(1)
CmbRec.SelectedIndex = Val(Subnode1.InnerText) - 1
CmbDonor.SelectedIndex = Val(Subnode2.InnerText) - 1
btnPrev.Enabled = True
If (NodeNumber = NodeCount) Then
btnNext.Enabled = False
NodeNumber = 0 ' Reset count so start searching from zero (You can change strategy)
' btnNext.Enabled = False
Can you please help me solve this issue.