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

How to expand hierarchical Rad Grid and load Parent and Child data in one call ?

1 Answer 207 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SriRam Balasubramanian
Top achievements
Rank 1
SriRam Balasubramanian asked on 29 May 2014, 12:14 PM
Hi,

I am using hierarchical RadGrid. I am using 2 stored procedure, one for the parent rows and the other for the detailed rows. Using NeedDataSource event, I am binding the Hierarchy 0 (Parent) using 1st stored procedure. When the user expands the grid, the respective DetailTableDataBind event is called and I am passing the DataKeyValue to get the list of rows for the DetailsTable (Hierarchy 1) from the DB using 2nd stored procedure. I'm using HierarchyLoadMode="ServerBind" 

My customers want the grid to prepopulate both the parent and the details at one shot. I dont think I can repeatedly call DetailTableDataBind event for the DataKeyValue from the MasterTableView due to performance.

I don't know which event / approach will help to pull both parents and details at one shot using 2 stored procedures. I cannot change the stored procedures at this point in time as they have been working for other pages as well. 

Please share your thoughts on this.

Regards,
Sriram

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 May 2014, 08:25 AM
Hi SriRam,

If you work in hierarchy mode, you can define when the DataBind for GridTableView will occur through the property:GridTableView.HierarchyLoadMode. Please take a look at this article for more information on Hierarchy load modes

Thanks,
Princy
Tags
Grid
Asked by
SriRam Balasubramanian
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or