Use Inline Editors in Editor Templates

When you use the Kendo UI Editor in the inline editing mode in an MVC Editor template, the posting of content to the action is prevented.

The reason for this behavior is that the inline mode renders a DOM element which is not a form field and, therefore, no data is sent. To handle this scenario, implement further the Editor template by adding a hidden input and update it when the content of the Kendo UI Editor changes.

@model string

@(Html.Kendo().EditorFor(model => model)
    .Name(Html.NameFor(model => model) + "_Editor")
    .Tools(tools => tools.Clear().Bold().Italic().Underline())
    .Events(events => events.Change(@"function (ev){
        var hiddenInput =  $('#" + Html.NameFor(model => model) + @"');

@Html.HiddenFor(model => model)

See Also

For more runnable examples on the Kendo UI Editor in ASP.NET MVC applications, browse its How To documentation folder.

In this article
Not finding the help you need? Improve this article