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.
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
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
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