I am displaying the contents of a DataGrid into a label.
Below is what I have so far and it works if the number of rows don't go over 4.
Do Until count > 4
shiftString = CType(DsReport1.Tables("Report").Rows(count).Item("Shift"), String)
equipmentString = CType(DsReport1.Tables("Report").Rows(count).Item("Equipment"), String)
downtimeString = CType(DsReport1.Tables("Report").Rows(count).Item("Downtime"), String)
displayString += shiftString & " " & equipmentString & " " & downtimeString & ControlChars.NewLine
count += 1
Loop
displayLabel.Text = displayString
I need to determine what to use for my index of my loop. I just pulled 4 out of the air. One time it might be 10 or 2 for that matter. What it comes down to I guess, is how to determine the number of rows in the DataGrid?
Thanks
Below is what I have so far and it works if the number of rows don't go over 4.
Do Until count > 4
shiftString = CType(DsReport1.Tables("Report").Rows(count).Item("Shift"), String)
equipmentString = CType(DsReport1.Tables("Report").Rows(count).Item("Equipment"), String)
downtimeString = CType(DsReport1.Tables("Report").Rows(count).Item("Downtime"), String)
displayString += shiftString & " " & equipmentString & " " & downtimeString & ControlChars.NewLine
count += 1
Loop
displayLabel.Text = displayString
I need to determine what to use for my index of my loop. I just pulled 4 out of the air. One time it might be 10 or 2 for that matter. What it comes down to I guess, is how to determine the number of rows in the DataGrid?
Thanks