New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Use Editor Component as an Editor Template for Child Grid in Hierarchy

Environment

Product Version 2022.3.1109
Product Grid for ASP.NET MVC

Description

How can I use the a Nested Component as EditorTemplate in Child Grid?

Solution

When using a Nested Component internally, the special symbols should be manually escaped. In order to use a Nested Components as an EditorTemplate for a Child Grid in Hierarchy, implement the EditorTemplate as follows:

@model TelerikMvcApp90.Models.Course

@Html.Kendo().EditorFor(model => model.Description).Deferred()

@Html.Raw(Html.Kendo().DeferredScriptsFor("Description").ToHtmlString().Replace("\\\"{0}\\\"", "\\\\\"{0}\\\\\""))

See Also

In this article