Click here to Skip to main content
13,248,562 members (79,335 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have taken two tables and used "dt.Merge(dt1);" to merge the tables. The tables columns are merging fine but the values in the second table are not coming beside the first table, the values are coming after the last row of first table.

Posted 31-Jan-13 12:37pm
Updated 31-Jan-13 12:40pm
Sergey Alexandrovich Kryukov 31-Jan-13 18:33pm
First question you have to ask yourself, how come you got tables which needs merge? Also, what do you mean by "tables"? If it's a database, it might not have certain order; the order only appears as a result of query...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Add new columns in datatable1

And for each row in datatable 2, get the common column and values and update the existing datatable new columns with the values.
vinodkumarnie 1-Feb-13 5:34am
which table you want to merge..?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171114.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100