building grid with multiple datasources

3 posts, 1 answers
  1. Mike_T
    Mike_T avatar
    36 posts
    Member since:
    Aug 2006

    Posted 08 May 2010 Link to this post


    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. Yavor
    Yavor avatar
    11 posts

    Posted 13 May 2010 Link to this post

    Hello Mike_T,

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

    I hope this suggestion gets you started properly.

    Sincerely yours,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 13 May 2010 Link to this post

    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.

Back to Top