This is a migrated thread and some comments may be shown as answers.

building grid with multiple datasources

2 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike_T
Top achievements
Rank 1
Mike_T asked on 08 May 2010, 08:38 AM
Hello,

Please i need your help guys in building a grid using 3 datasources:
Query 1: Will return the categoryName,categoryOrderNumber,CategoryName from TABLE1
Query 2: Will return the SALES totalweight,totalPrice,TotalpriceUSD for the Categories from TABLE2
Query 3: Will return the PURCHASES totalweight,totalPrice,TotalpriceUSD for the Categories from TABLE3

Catergory SalesTotalWeight SalesTotalPrice SalesTotalPriceUSD PurchaseTotalWeight SalesTotalPrice SalesTotalPriceUSD
Category1             x                             x                         x                                        x                             x                           x
Category2             x                             x                         x                                        x                             x                           x
Category3             x                             x                         x                                        x                             x                           x


Thanks in advance,

2 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 13 May 2010, 06:44 AM
Hello Mike_T,

One possible option in this case would be to concatenate the data by using joins:

http://www.w3schools.com/sql/sql_join.asp

I hope this suggestion gets you started properly.

Sincerely yours,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Accepted
Andy Green
Top achievements
Rank 1
answered on 13 May 2010, 07:41 AM
This is very easy if you are using a stored procedure and connecting your data up in code behind.

In the stored proc have as many select statements as you need, then in the code behind when you reference the data use Table(0) for the first select (this is normal for 1 recordset), Table(1), Table(2) ect.

Not sure how this would work if you connect the grid to its data a different way.

ANdy
Tags
Grid
Asked by
Mike_T
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Andy Green
Top achievements
Rank 1
Share this question
or