There is the a form:
| Segment | TimeIn | TimeOut | Duration |
| 1 | XX:XX:XX:XX | XX:XX:XX:XX | XX:XX:XX:XX |
| 2 | XX:XX:XX:XX | XX:XX:XX:XX | XX:XX:XX:XX |
| 3 | XX:XX:XX:XX | XX:XX:XX:XX | XX:XX:XX:XX |
| 4 | XX:XX:XX:XX | XX:XX:XX:XX | XX:XX:XX:XX |
The number of Segment depends on how many xml file is found. I want to limited the information cannot be empty in middle (without the 1st seg1 and last seg4). How can I set get these middle segment number? My way is using SegmentNo.Text <> 1 and SegmentNo.Text <> last. However it can't use ".last". How can I get the last row's Segment No?
Code
For Each r As GridDataItem In gridSegment.Items
If FileName.Text <> "" Then
// Red the textbox if data is missing
Else
If timeIn.Text = "" AND timeOut.Text = "" AND Duration.Text = "" Then
If Segment.Text <> 1 AND Segment.Text <> ??? Then
// Red that row all textbox
End If
End If
End If
Next