GridView
How to add different columns from different tables in grid view of ASP.NET using c#?
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.
Hermes Condez37 pointsPosted Mar 7, 2012, 1:38 AM EST
Ex:
SQL Query
SELECT a.Col1, b.Col2, c.Col1, d.Col5
FROM Table1 a
INNER JOIN Table2 b
ON a.ID = b.ID
INNER JOIN Table3 c
ON a.ID = c.ID
INNER JOIN Table4 c
ON a.ID = d.ID
the result of this query is a single table with columns from different tables that conforms to the "JOIN CONDITION". This result can now be viewed in a datagrid