hi i am new to asp.net .. how to merge two data tables into data set?
and display that data into gridview?
Merge two datatables into dataset?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Fathima Jabbar15 reputationPosted Oct 28, 2014, 2:36 AM EDT
You can merge one datatable (ex: dt1) to another(dt2) like,
dt1.Merge(dt2, true);
and you can set the gridview's datasource as dt1.
or you can add datatables to a dataset as follows,
DataSet ds = new DataSet();
ds.Tables.AddRange(new DataTable[] {dt1, dt2});
Hope this helps u.