[Solved] How to merge two DataTables like this?

Here you go. Might not be pretty but does the job. No matter which DataTable has more row it will add them. private static DataTable MergeTables(DataTable dt1, DataTable dt2) { DataTable merged = new DataTable(); //copy column struct from dt1 merged = dt1.Clone(); //create columns from dt2 foreach (DataColumn col in dt2.Columns) { merged.Columns.Add(col.ColumnName); } … Read more