hi i am new to asp.net .. how to merge two data tables into data set?
and display that data into gridview?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Fathima JabbarPosted Oct 28, 2014, 6:36 AM
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.