insert row into a datatable from other datatable at some particular position
-
i have table 1 and table 2, both have same schema. i want to insert rows from tabel2 into table1 at some particular position say position 3. how can i do it. with import row it inserts row at the end of the table so it cant help me.
-
how is it possible can u please write some lines of code if possible. i tell you what i want is i want ROW1 from table 1, ROW2 from table 2, ROW3 from table 1 etc. i tried to use insert at and the issue it throw is row belongs to other table.
-
how is it possible can u please write some lines of code if possible. i tell you what i want is i want ROW1 from table 1, ROW2 from table 2, ROW3 from table 1 etc. i tried to use insert at and the issue it throw is row belongs to other table.
You cannot copy DataRow objects from one DataTable to another unless they have the EXACT same schema. Your better option would be to create a new DataRow in the target table and copy the values you want from the source table.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
You cannot copy DataRow objects from one DataTable to another unless they have the EXACT same schema. Your better option would be to create a new DataRow in the target table and copy the values you want from the source table.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak