How can I get specific row's column value of GridDataItem (vb.net) ?

0 Answers 18 Views
DataForm
Matthew
Top achievements
Rank 1
Matthew asked on 12 Mar 2025, 02:04 AM | edited on 12 Mar 2025, 02:43 AM

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

 

 

No answers yet. Maybe you can help?

Tags
DataForm
Asked by
Matthew
Top achievements
Rank 1
Share this question
or