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

[Solved] Detail Table is empty during client side databinding

3 Answers 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Satyaprakash J
Top achievements
Rank 1
Satyaprakash J asked on 06 Jan 2010, 03:30 PM
Hi,
  I am using a RadGrid with a MasterTable and 2 Detail Tables. I am binding the detail table client side using the following javascript code.
function HierarchyExpanding(sender, args) {  
 
    detailTableView = sender.get_detailTables()[2];  
    WebService.GetDetails(updateDetailTable);  
 
      
 
}  
 
function updateDetailTable(result) {  
    alert("Updating");  
    alert(result.length);  
    alert(result[0].DealId);  // result is a C# List<CustomClass>
     
    detailTableView.set_dataSource(result);  
    detailTableView.dataBind();  
      
      

But the detail table comes blank. Please let me know if I am missing something.

Thanks
Satyaprakash J




3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 06 Jan 2010, 03:50 PM
Hi Satyaprakash,

Hierarchical grid structure with client binding is not a supported scenario. The furthest you can get in this direction is demonstrated in the following blog post:
http://blogs.telerik.com/vladimirenchev/posts/08-09-09/how_to_telerik_radgrid_master_detail_client-side_data-binding_using_linq_to_sql_and_webservice.aspx

I hope this helps.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Satyaprakash J
Top achievements
Rank 1
answered on 06 Jan 2010, 04:21 PM
Hi,
    I checked the link http://blogs.telerik.com/vladimirenchev/posts/08-09-09/how_to_telerik_radgrid_master_detail_client-side_data-binding_using_linq_to_sql_and_webservice.aspx . The code mentioned in the link uses a NestedViewTemplate within the MasterTableView whereas I am using DetailTable. Does this mean that ClientSide Databinding works for NestedViewTemplate and not for DetailTable.

Also I checked the link http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchyloadmodeclient/defaultcs.aspx. Could you please let me know why it works in this case.

Thanks
Satyaprakash J
0
Tsvetoslav
Telerik team
answered on 07 Jan 2010, 07:53 AM
Hello Satyaprakash,

You are correct that client-side binding does not work with detail tables - this is not a supported scenario. You can work, to some extent, around the issue in the way shown in the blog post using nested view templates.

As for the example, you have mentioned - please, note that it features a hierarchical grid bound on the server. In this case client-side hierarchy loading refers to a different feature of the gird, namely, the capability to expand/collapse the items in the browser, which is achieved by setting the HierarchyLoadMode="Client" property of the corresponding table view and is much faster. More information you can find at the following help topic: http://www.telerik.com/help/aspnet-ajax/grdhierarchyloadmodes.html

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Satyaprakash J
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Satyaprakash J
Top achievements
Rank 1
Share this question
or