0

I am trying to move through a list "TodaysCard" and print the TimeOfDay.ToString into the first column of every row and to only create the amount of rows that are needed. But am a bit of a novice when it comes to this and can only get it to display the TimeOfDay.ToString value for the first item in the list over and over again. Just wondering how I can get it to iterate through each item properly.
Any help greatly appreciated - Thanks

For Each Race In TodaysCard
                    With (Race)
                        Try
                            Dim Time As DataColumn = New DataColumn("Time")
                            Time.DataType = System.Type.GetType("System.String")
                            Table1.Columns.Add(Time)

                             For i = 0 To TodaysCard.Count
                                Row = Table1.NewRow()
                                Row("Time") = .eventDate.TimeOfDay.ToString
                                Table1.Rows.Add(Row)
                            Next
                        Catch

                        End Try

                    End With
                Next
1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by jackiejoe
0

Ok, silly me - wasn't thinking straight. Worked it out

Row("Time") = TodaysCard(i).eventDate.TimeOfDay.ToString

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.