GridView
How to add different columns from different tables in grid view of ASP.NET using c#?
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.
Hermes CondezPosted Mar 7, 2012, 6:38 AM
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