D
David
I am trying to loop through a dataview to collect rows
after they have been sorted, and insert them into a new
table. Here is a code snippet:
DataView dv = (view of table of existing dataset)
DataTable dt = new DataTable();
foreach (DataRowView drv in dv)
{
dt.Rows.Add(drv.Row);
}
This generates the error that the row belongs to another
table. Any suggestions on how to change this to make it
work?
Thanks,
David
after they have been sorted, and insert them into a new
table. Here is a code snippet:
DataView dv = (view of table of existing dataset)
DataTable dt = new DataTable();
foreach (DataRowView drv in dv)
{
dt.Rows.Add(drv.Row);
}
This generates the error that the row belongs to another
table. Any suggestions on how to change this to make it
work?
Thanks,
David