Nested Grid Demo : A Question

5 posts, 0 answers
  1. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 11 Dec 2012 Link to this post

    Hi there ! I tried to follow up this (http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx) and also referred this (http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx) demo and my application it works in a similar way as that demo does. But I have a question for this :

    What if I want to have >1 results in the nested grid for records in main grid ?

    In terms of Northwind Database (to clarify) assume that I want to enlist customers in the main Grid and their Order History in the nested grid using some stored procedure (could not attach the txt file).

    My application shows just one record in the nested (inner) grid at the moment. Is there a way to over-come this ?

    Thanks,
    -Aarsh


    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Attachment:
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    USE [Northwind]
    GO
    /****** Object:  StoredProcedure [dbo].[CustOrderHist]    Script Date: 12/11/2012 09:26:46 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[CustOrderHist] @CustomerID nchar(5)
    AS
    SELECT ProductName, Total=SUM(Quantity)
    FROM Products P, [Order Details] OD, Orders O, Customers C
    WHERE C.CustomerID = @CustomerID
    AND C.CustomerID = O.CustomerID AND O.OrderID = OD.OrderID AND OD.ProductID = P.ProductID
    GROUP BY ProductName
  2. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 11 Dec 2012 Link to this post

    I want something like this : (But i do not want to have CRUD operations on it as the demo has, I just want them as readonly)
    http://dotnetspeaks.com/LiveDemos/ASP.NET/GridView/EditingNestedGridView.aspx
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 11 Dec 2012 Link to this post

    Or It may be as our "Account Overview" Grid, if one can please figure out to bring all those entries from the database. Attached is exactly what I want, provided if we can manage to get the all the entries from the database ( including "Tracked Forums" and "Tracked Issues" )



    Of course this is a panel but I want to do the same with Grid, where expanding the main item can display >1 items
  5. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 12 Dec 2012 Link to this post

    No-one ?
  6. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 14 Dec 2012 Link to this post

    Hello Aarsh,

    If I understand correctly the requirements, you want to enlist the products that were ordered by a given customer. This can be done using DetailTables and declarative relations. In the SqlDataSource you can define the SelectMethod to match that in the stored procedure. In attachments you can find an example demonstrating this approach. Additionally please take a look at this help article in which declarative relations are thoroughly explained.

    All the best,
    Angel Petrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017