Hi,

I have two DataTables (dTable and childrenTable) and I need to insert
one row from childrenTable to dTable in a specific position. My code
is like this:

For Each row In childrenTable.Rows
     Dim newRow As DataRow = row
     dTable.Rows.InsertAt(newRow, indexInsert)
     indexInsert = indexInsert + 1
Next

However, I'm having the error: "This row already belongs to another
table". Any ideas about how to solve this problem?

Thanks in advance,

Ana

Reply via email to