Multi-Hierarchy Grids

2 posts, 0 answers
  1. Keith
    Keith avatar
    15 posts
    Member since:
    Sep 2011

    Posted 14 Oct 2011 Link to this post

    I've read through several posts on this and none of the situations seem to quite follow what I'm needing to do. 

    I would like to have a 3-Tier set of grids that only the 1st Tier populates on Load, each child grid then get's it data when the parent row expands.  I would like to do this without a full postback event and take advantage of ajax and client side code. 

    it looks something like this:

    <telerik:RadGrid ID="Tier1Grid"...>
        <MasterTableView ... HierarchyLoadMode="ServerOnDemand">
                <telerik:RadGrid ID="Tier2Grid"...>
                    <MasterTableView ... HierarchyLoadMode="ServerOnDemand">
                            <telerik:RadGrid ID="Tier3Grid"...>
                                <MasterTableView ...>

    For the Tier1Grid, I am able to use the NeedDataSource, ItemDataBound, etc. for binding the data.

    The biggest challenge has been during the ajax binding of data to the 2nd and 3rd Tiers.  I've used the ClientSettings - ClientEvents - OnHierarchyExpanding event to begin the process of calling to a webservice to retrieve the data for the second tier.  During this code I want to bind to the appropriate MasterTableView, but I'm unable to determine how I should find the parent grid Tier2Grid so that I can use the set_dataSource and set_dataBind methods.

    I have tried using the jQuery function $find('<%= Tier2Grid.ClientID %>'); yet I get a compile error from .NET referencing that it knows nothing about the grid within the template.

    I hope this is enough to get the conversation started.  Please feel free to reference other threads and demos.  I might have missed them in my search.

    Best Wishes,

    I hope this is enough
  2. Mira
    Mira avatar
    1124 posts

    Posted 19 Oct 2011 Link to this post

    Hello Keith,

    Please note that with the client side data binding approach for the grid, there is no out-of-the-box support for hierarchical structures (possible solutions are presented in this blog post).
    Also, you can examine the Hierarchy with Templates demo to see a way to show and load the nested data only when required.

    I hope this helps.

    Best wishes,
    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