I have a grid that uses a ClientDetailTemplate. The template is defined as:
Note that a column uses a ClientTemplate. The client template is simply a dropdown list. However, the grid is unable to locate the client template and instead returns the error: "Uncaught ReferenceError: BuildingChangeValidationStatusType is not defined"
However, If I remove the detail grid from the Client Detail Template and put it in a div alongside the parent grid, and remove the ".ToClientTemplate()" call, it works perfectly. So there's something about placing a grid containing a column client template inside of a parent grid's client detail template that make it not work. Any ideas?
<script id="plan_client_template" type="text/kendo-tmpl"> @(Html.Kendo().Grid<Rep.Models.BuildingChangeValidationViewModel>() .Name("CVGrid") .Scrollable() .Selectable() .Editable(editable => editable.Mode(GridEditMode.InLine)) .Columns(columns => { columns.Bound(b => b.Field); columns.Bound(b => b.BuildingChangeValidationStatusType).ClientTemplate("#=BuildingChangeValidationStatusType.Value#").Width(250); columns.Command(command => command.Custom("Update").Click("updateValidation")); columns.Command(command => { command.Edit(); }).Width(172); }) .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(b => b.BuildingId); model.Field(b => b.BuildingChangeValidationStatusType).DefaultValue( ViewData["defaultBuildingChangeValidationStatuses"] as Rep.Common.LookupItem); }) .PageSize(5) .Read(read => read.Action("BuildingValidations_Read", "Plan", new { buildingId = 0 })) .Update(update => update.Action("BuildingValidations_Update", "Plan")) ) .ToClientTemplate() )
</script>Note that a column uses a ClientTemplate. The client template is simply a dropdown list. However, the grid is unable to locate the client template and instead returns the error: "Uncaught ReferenceError: BuildingChangeValidationStatusType is not defined"
However, If I remove the detail grid from the Client Detail Template and put it in a div alongside the parent grid, and remove the ".ToClientTemplate()" call, it works perfectly. So there's something about placing a grid containing a column client template inside of a parent grid's client detail template that make it not work. Any ideas?