this is the code for merging the two datatable : dt_merged.Merge(dt)
Asked
Active
Viewed 1,501 times
1 Answers
0
In C# is: (Just convert to VB Syntax)
dt1 = new DataTable();
dt2 = new DataTable();
dt1.Merge(dt2);
grid.DataSource = dt1;
Replace the dt1 and dt2 by loading from your database.
https://msdn.microsoft.com/en-us/library/wkk7s5zk%28v=vs.110%29.aspx
This might be duplicated, you can check in this link: Merging 2 data tables in vb.net

Community
- 1
- 1

Roger Oliveira
- 1,589
- 1
- 27
- 55
-
1i tried this but this error comes up Both DataSource and DataSourceID are defined. i cant seem to figure out how to combine both – ANNE Jun 23 '15 at 06:29
-
@ANNE try this link: http://www.codeproject.com/Questions/255064/Both-DataSource-and-DataSourceID-are-defined-on-Gr – Roger Oliveira Jun 23 '15 at 06:46
-
@ANNE the link above has a solution for you problem with examples. – Roger Oliveira Jun 23 '15 at 06:48