But.... if I add template for the last-level grid, I cannot read data from the properties of "MyAmazingModel3" model inside template of "ThirdGrid
"... it sounds odd, but inside "ThirdGrid" i see data from "SecondGrid".

Probably i skipped something in the documentation or i have to pass model from parent grid to child one?

Please advise.

Thanks in advance!

Answer

Rosen

In order column ClientTemplate of the child grid to be executed in the correct context (its dataItem) the code expression should be escaped. Otherwise, the code expression will be executed as part of the outer template, in which the Grid itself is defined. For example:

@*THIRD GRID*@

<script id="second-nested-grid" type="text/kendo-tmpl">

@(Html.Kendo().Grid<MyAmazingModel3>()

.Name("ThirdGrid_#=ID#") <-- this is evaluated as part of the second-nested-grid template, thus when the grid is created

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.