Q:

How to merge Datatable and gridview based on common column?

I have one gridview and one service which return datatable. i have common column in both gridview and datatable. Now i want to merge both into single gridview based on common column.
Service:
ServiceReference1.AMServiceClient objAMService = new AMServiceClient();

DataTable dt = new DataTable();
dt= objAMService.fnGetChildAppDetails();

Both datatable and myGridview contains a common column named ChildId.

A:

you will have to take gridview contents in datatable and using UNION operation you can merge two datatables
for more info DataTatable merge using union

