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

Hierachical RadGrid-Unable to display the child table using jquery.

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 24 Jan 2013, 04:35 AM
I'm working on  a Hierachical RadGrid which is enclosed in an  asp UpdatePanel, and I need to customize it in such a way that - Only the parent rows should be rendered first(the query corresponding to this fetches only the parent rows from the database), and then on the expand button click - the 'Id' corresponding to the row is send via ajax and a different query fetches the child data corresponding to only the selected row.
 Currently I'm invoking an external ajax request through a jquery call from ClientEvents-OnRowClick in the ClientSettings of the grid. Now I'm unable to fill data into 
the child table from the ajax response using jquery.
Is there an easier way to go about it? That is there an inbuilt function to use 2 different queries to grab the data that populates the Hierachical RadGrid - one to get the parent rows and the other to get the child row corresponding to the parent row that is clicked.


Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 28 Jan 2013, 01:44 PM
Hi Paul,

In your case the easier way for achieving the required functionality is to simply use the Hierarchical Load Mode ServerOnDemand. This way only detail table-views of the expanded items are rendered and the The roundtrip to the database happens when the grid is bound to get the parent items and when an item is expanded for the children. See the online resources below for more information on this matter:

http://www.telerik.com/help/aspnet-ajax/grid-hierarchy-load-modes.html
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchyloadmodemixed/defaultcs.aspx



Kind regards,
Maria Ilieva
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
Paul
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or