G
Gene Hubert
I'm using DataTable.ImportRow to move data from one datatable to
another...
Dim dt, dtTarget As DataTable
Dim dr As DataRow
dt = DirectCast(Me.DataSource, DataTable)
dtTarget = dt.Clone 'copy the data structure
dtTarget.DefaultView.Sort = String.Empty 'remove the sort
For Each dr In dt.Select 'copy the data
dtTarget.ImportRow(dr)
Next
I've got 10 columns in the datatable, with one of them being of type
boolean. The value of the boolean column is not being transferred by
import row. All the other columns are.
I checked this in the debugger and I can see that the boolean value is
correct in dr inside the loop but does not carry over to dtTarget.
Are there any known issues with this or can anyone see a reason why
this is happening? The above code is from a derived datagrid.
Thanks,
Gene H.
another...
Dim dt, dtTarget As DataTable
Dim dr As DataRow
dt = DirectCast(Me.DataSource, DataTable)
dtTarget = dt.Clone 'copy the data structure
dtTarget.DefaultView.Sort = String.Empty 'remove the sort
For Each dr In dt.Select 'copy the data
dtTarget.ImportRow(dr)
Next
I've got 10 columns in the datatable, with one of them being of type
boolean. The value of the boolean column is not being transferred by
import row. All the other columns are.
I checked this in the debugger and I can see that the boolean value is
correct in dr inside the loop but does not carry over to dtTarget.
Are there any known issues with this or can anyone see a reason why
this is happening? The above code is from a derived datagrid.
Thanks,
Gene H.