I have this simple VB.NET function:
Dim endval = Convert.ToInt16(googleXMLdocument...<s:currentItemCount>.Value) - 1
For counter = 0 To endval
Dim seller = googleXMLdocument...<s:name>(counter).Value
Dim containsValue = ToBeIgnored.AsEnumerable().Any(Function(r) r.Field(Of String)("Ignore") = seller)
If containsValue Then
Continue For
End If
row = GoogleResults.NewRow()
GoogleResults.Rows.Add(row)
GoogleResults.Rows(counter)("Seller") = seller 'sometimes this line throws an exception there is no row at position x
Next
In the last line I sometimes get an exception there is no row at position x. What could cause this?
Your counter variable doesn’t look like it’s the same as number of rows for your GoogleResults table.
I’m guessing you are looking for something like this:
or more directly: