Geoff,
In addition to the other comments:
I would use a regular For loop:
Dim dataViewObj As DataView
For index As Integer = 0 To dataViewObj.Count - 2
Dim x As DataRowView = dataViewObj(index)
Dim x1 As DataRowView = dataViewObj(index + 1)
' Some calculations go here
Next
I use Count - 2 as the last record will not have a next record.
Hope this helps
Jay
"Geoff Jones" <ge***@NODAMNSPAM.com> wrote in message
news:40***********************@news.dial.pipex.com ...
Hi
Suppose I have a loop such as:
For Each x As DataRowView In dataViewObj
' Some calculations go here
Next
Suppose we to access within the loop not only the current row but the next
one e.g. during the first loop x will be the first row, how can I access
the second row as well?
Thanks in advance
Geoff