Click here to Skip to main content
15,991,221 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I Want to copy Data-table 2 Column with data to data-table 2

data-table 1
Age

Height

5

50

6

60

7

70

8

80


data-table 2
Age

Weight

5

30

7

35

Output

Age

Height

Weight

5

50

30

6

60

NULL

7

70

50

8

80

NULL
Posted

1 solution

Copy the whole data table and remove the specific columns
e.g.
DataTable cpy;
cpy = original.Copy();
cpy.Columns.Remove("OrderName");
cpy.Columns.Remove("OrderDate");
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900