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

Hierarchical Grid Data Binding Issues

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tejpartap Singh
Top achievements
Rank 1
Tejpartap Singh asked on 19 Feb 2009, 01:50 AM
HI There,

i am just curious to know

1. is telerik RadGrid supporting the single data source for hierarchical grid ? i mean to say my data or list is in hierarchical format and i just input the list as a data source to the grid and automatically it recognizes the list structure and paint the Hierarchical grid. hence in this way i dont need to mention two different data sources for the grid, one at materTable level and second at childTable level.

2. (In Context Of MVC) when providing the data source for the Hierarchical grid then it paints the grid in the collapsed mode. okay this is fine till here. now when i click on the expand button, again it paints the whole grid at parent level along with details at child level, which is again a server call. hence server (Controller class in MVC Context) returns the list at the MaterTable level and list at the ChildTable level, which is additional burden to the server. 

    why it is not possible to return only the contents at the child level without returing the parent level list ? 
    
    why is it not possible to return the set of child records related only to the master record selected (Not the full list of child records ) ?, is it possible to employ Ajax in this context ?


i want it goes to server or controller only for the required child control and does not return the full parent level list.
please give your input on this.

ex: 

protected

void Page_Load(object sender, EventArgs e)

 

{

currentActivity = (CMSTracking.Data.

Activity)ViewData.Model;

 

RadGrid1.MasterTableView.DataSource = ViewData[

"Statuses"];

 

}

 

protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)

 

{

 

GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;

 

e.DetailTableView.DataSource = ViewData[

"Followups"];

 

}



1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 23 Feb 2009, 03:13 PM
Hello Tejpartap,

I am afraid that RadGrid does not support hierarchy in MVC.
From the code snippet you posted I assume that your listening for RadGrid1_DetailTableDataBind in your View code-behind file, which defeats the purpose of MVC.
You can find information about RadGrid in MVC here.

Regarding your question for RadGrid hierarchy in general there are three types of loading modes:
Hierarchy load modes

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Tejpartap Singh
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or