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

[Solved] NestedViewTemplate On demand loading, just not working out

1 Answer 265 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ticket Solutions Account
Top achievements
Rank 1
Ticket Solutions Account asked on 13 Mar 2010, 08:53 AM
Hi,

Ok' I've got a multi level Hierarchy in my radgrid and trying to user server on demand loading at every level to save load on SQL.

At one stage of the Hierarchy i've got a DetailTables and I am using the DetailTableDataBind in C# to bind the datasource to the grid and its working peachy. The expected results is that it will only query the data when the user expands the item and its working fine.

My Problem is that I am trying to do this with a NestedViewTemplate as well. Now from what I read this is supported, however I'm not sure the way I'm going about it is correct.

My NestedViewTemplate contains a multipage view control with some tabs, each page view has its own SQL datasource control, that has its parameter pointing at a Label Control that evaluates the id for this row from the parent.

<asp:Label ID="Label1"  Text='<%#Eval("id")%>'  Visible="false" runat="server" /> 


This label control is inside the NestedViewTemplate (I got this method from one of the demos).

And I've set the mastertableview that contains this view template to on deamnd loading

<MasterTableView HierarchyLoadMode="ServerOnDemand" ... 


The result now is, I'm watching SQL profiler spew out 6 queries for every row that the radgrid has on load.

So it's obviously not loading these on demand.

The example that I am looking at for ondeamnd loading shows Using a separate datasource for the NestedViewTemplate, I am not using a datasource nor parent child relation ship, do I need to implement this maybe? its seems a bit superfluous.

I there something with my method that's wrong?

Thanks,

Joel



1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 18 Mar 2010, 07:35 AM
Hello Andrew,

To see more information along the lines of the requested setup, please refer to the following example:

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

It handles a very similar functionality.
I hope this information helps.

Sincerely yours,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Ticket Solutions Account
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or