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

[Solved] Nesting Client Detail Templates in Razor - Ajax controller action not being called

0 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Reid
Top achievements
Rank 2
Reid asked on 01 May 2012, 03:44 PM
Hi all,

I have a hierarchal grid that is intended to show three levels deep based on this demo
http://demos.telerik.com/aspnet-mvc/razor/grid/hierarchyajax

It is nested in a TabStrip and is working for the top layer grid.  The rows in the main grid display the first nested grid in each row when expanded but the nested grid does not get filled with data because the the Ajax controller method is not being called.  The Ajax controller method for the outer or main grid is being called.

There are three questions here for me,
  1. How to format the markup in the ClientTemplate() method when it is nested to call the @helper method effectively?
  2. Why the controller action is not being called when that row is expanded?
  3. Why the view loads with the first detail row expanded?

So the Tabstrip's Content() section uses this to show the primary grid :

@<text>
  <div>
     @RenderCurrentPaymentsGrid()
  </div>
</text>


That next helper method that should do the same to render the Detail view always bombs with "ClientTemplate (string) has some invalid arguments", or "string is not a valid delegate type" when I try to render it in the ClientTemplate() portion of the first grid using this ..

@<text>   RenderCurrentPaymentsDetailGrid() </text>

If I take the markup in that helper method and paste it into the ClientTemplate() call replacing the code above it works and does not bomb, but the issue still remains that the nested detail controller action is not being called.  So this is a case where a @helper method is callig another @helper method, both in the same view.

I have a suspicion that is it due to it being the third layer or dataset.  Yet the demo shows it displaying three layers deep so I am sort of at a stop here. 

Any suggestions would be appreciated.

Thanks,
Reid







Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Share this question
or