How to know which row number is positioned in vb
in a for each?
I am trying the form row.CurrentRow.Index
but it tells me:
The public member 'CurrentRow' can not be found in the 'DataGridViewRow' type.
Dim ultimo = Datos.Rows(Datos.Rows.Count - 1)
For Each row In Datos.Rows
Dim fecha1 = row.Cells(4).Value.ToString()
Dim fecha2 = row.Cells(5).Value.ToString()
If row.Cells(4).Value.ToString() <> "" And row.Cells(5).Value.ToString() <> "" Then
If row.CurrentRow.Index <> ultimo Then