S
Sam
Hi,
I'm adding columns to a datatable as followed. The values are from
textboxes or comboboxes.
The first column is properly field but then all the subsequent columns
just contain "", whereas the source txtboxes or comboboxes values are
correct. Why is that ?
thx
Dim dt As New DataTable
Dim row As DataRow
dt.Columns.Add("FieldName", Type.GetType("System.String"))
row = dt.NewRow
row("FieldName") = txtFieldName.Text
dt.Rows.Add(row) --> contains "the right string"
dt.Columns.Add("EntryInfo", Type.GetType("System.String"))
row = dt.NewRow
row("EntryInfo") = txtEntryInfo.Text
dt.Rows.Add(row) --> contains "" instead of "a string"
I'm adding columns to a datatable as followed. The values are from
textboxes or comboboxes.
The first column is properly field but then all the subsequent columns
just contain "", whereas the source txtboxes or comboboxes values are
correct. Why is that ?
thx
Dim dt As New DataTable
Dim row As DataRow
dt.Columns.Add("FieldName", Type.GetType("System.String"))
row = dt.NewRow
row("FieldName") = txtFieldName.Text
dt.Rows.Add(row) --> contains "the right string"
dt.Columns.Add("EntryInfo", Type.GetType("System.String"))
row = dt.NewRow
row("EntryInfo") = txtEntryInfo.Text
dt.Rows.Add(row) --> contains "" instead of "a string"