Click here to Skip to main content
15,174,684 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have to quesries like.

select name from tableone

and second is
select sum(quantity) from tabletwo.

if there is only one query then i can show it in gridview using SqlCommand or SqlDataAdapter but i have to using two tables .Here joining is not possible that's why

I have to display data in gridview .

Please help me.

thanking you
Mohd Wasif
Updated 27-Apr-11 0:26am

I cannot understand why you can join them and send the resultset. Ultimately you are going to display it in grid.

One you you could, get the result from two queries, and merge them into single datatable in your application and show it in grid.

Let me know, if you are looking for something else.
Get the results from both queries and join them in memory just before you bind them to the GridView instead of joining them in a single query.[^]

Entity Framework:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900