i have a table like this:
Monday Tuesday Wednesday Thursday
15 4
this was done by using the code below:
Dim field3 = row.Field(Of Int32)("data")
Dim field1 = row.Field(Of String)("data1")
If field3 = 15 Then
If field1 = "Zone 4" Then
End If
table2.Rows.Add(field3, field1)
End If
Next
now if i want to add some data in wed and thurs using the same method, it wont let me, it will just add it under Monday and Tuesday, how would i able to add data to wed and thurs, when i debug, there are 4 columns; mon - thurs. but how do i set data to wed and thurs.
my columns:
Dim table2 As New DataTable
' columns in the DataTable.
table2.Columns.Add("Monday", System.Type.GetType("System.String"))
table2.Columns.Add("Tuesday", System.Type.GetType("System.String"))
table2.Columns.Add("Wednesday", System.Type.GetType("System.String"))
table2.Columns.Add("Thursday", System.Type.GetType("System.Int32"))