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

Multi-Hierarchy Grids

1 Answer 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 2
Iron
Veteran
Keith asked on 14 Oct 2011, 06:08 PM
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">
        <NestedViewTemplate>
            <telerik:RadGrid ID="Tier2Grid"...>
                <MasterTableView ... HierarchyLoadMode="ServerOnDemand">
                    <NestedViewTemplate>
                        <telerik:RadGrid ID="Tier3Grid"...>
                            <MasterTableView ...>
                                <Columns>....</Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </NestedViewTemplate>
                    <Columns>....</Columns>
                </MasterTableView>
            <telerik:RadGrid>
        </NestedViewTemplate>
        <Columns>....</Columns>
    </MasterTableView>
</telerik:RadGrid>

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,
Keith

I hope this is enough

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 19 Oct 2011, 08:05 AM
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,
Mira
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
Tags
Grid
Asked by
Keith
Top achievements
Rank 2
Iron
Veteran
Answers by
Mira
Telerik team
Share this question
or