Following problem: I've got a "detail" grid as element of a ClientDetailTemplate of a "master" grid. One column ("IsActive" in this example) in the detail grid should get a ClientTemplate, whose value is dependent on a property from the detail grid's data:
@(Html.Kendo().Grid<MasterEntity>()
.Name("masterGrid")
.Columns(columns =>
{
...
})
.ClientDetailTemplateId("detailsTemplate")
.DataSource(...))
)
<script id="detailsTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<DetailEntity>()
.Name("detailGrid_#=Id#")
.Columns(columns =>
{
columns.Bound(p => p.IsActive).ClientTemplate("#= IsActive #");
})
.DataSource(...)
.ToClientTemplate()
)
</script>
Unfortunately, the expression "#= IsActive #" in the detail template cannot be evaluated correctly. The "scope" for the template is set to the master grid - thus I can add an expression to a property of the master grid, but not the detail grid. How can I achieve to set a ClientTemplate for the detail grid column with property expressions to the client grid data?
Thanks, Dimitrij