How to merge two gridviews and display it in another gridview ??
thank u!!
Loading
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
Sreejesh SPRank #1,975 · 740 reputationPosted Mar 25, 2013, 12:52 AM EDT
please use datatable by to fill gridview,then third datatble use to get values from first and second ,then this third datatable use to bind third grid view and you get the result is merging of first and second gridview
Please Read below sample code and apply your appliaction
page.cs
datatable dt=new datatable();
datatable dt2=new datatable();
datatable dt3=new datatable();
dt=<"get value from database or others'>;
dt2=<"get value from database or others'>;
gridview1.datasource=dt;
gridview1.databind();
gridview2.datasource=dt2;
gridview2.databind();
dt3 = dt.Copy() dt3.Merge(dt2, false, MissingSchemaAction.Ignore); gridview.datasource=dt3; gridview.databind(); Please try this code Thanks Sreejesh S PSatyapriya NayakRank #47 · 31.5K reputationPosted Mar 25, 2013, 12:53 AM EDT
AbhiPriya M V63 reputationPosted Mar 25, 2013, 1:25 AM EDT