G
Guest
i getting only "null" in my dataGrid
can someone tell me why??
thanks
Dim DataGrid1 As New DataGrid
Dim Table1 As DataTable
Table1 = New DataTable("AllExercises")
With Table1
.Columns.Add(New DataColumn("first", GetType(System.String)))
.Columns.Add(New DataColumn("second", GetType(System.String)))
.Columns.Add(New DataColumn("res", GetType(System.String)))
End With
Dim dr As DataRow
Dim dc As DataColumn
For Each dr In dsAdd.Tables(0).Rows
Dim dr1 As DataRow = Table1.NewRow
For Each dc In dsAdd.Tables(0).Columns
dr1.Item("first") = dr(dc.ColumnName).ToString
dr1.Item("second") = dr(dc.ColumnName).ToString
dr1.Item("res") = dr(dc.ColumnName).ToString
Next
Next
can someone tell me why??
thanks
Dim DataGrid1 As New DataGrid
Dim Table1 As DataTable
Table1 = New DataTable("AllExercises")
With Table1
.Columns.Add(New DataColumn("first", GetType(System.String)))
.Columns.Add(New DataColumn("second", GetType(System.String)))
.Columns.Add(New DataColumn("res", GetType(System.String)))
End With
Dim dr As DataRow
Dim dc As DataColumn
For Each dr In dsAdd.Tables(0).Rows
Dim dr1 As DataRow = Table1.NewRow
For Each dc In dsAdd.Tables(0).Columns
dr1.Item("first") = dr(dc.ColumnName).ToString
dr1.Item("second") = dr(dc.ColumnName).ToString
dr1.Item("res") = dr(dc.ColumnName).ToString
Next
Next