I am using the Fluent API of the Telerik UI for Asp.Net MVC to build a form that has an Editor as one of it's elements, bound to a backing property in my model. I want my view to act as both the edit and display page for my model, so I want to disable the Editor when in display mode, but I cannot find a method to do so, and my attempts to change the contenteditable attribute to false have failed. y research lead me to work arounds in other version of Kendo-UI that haven't worked for me. Below is a snippet of my form with the Editor that I am looking to disable.
@(Html
.Kendo()
.Form<
InformationModel
>()
.Name("formInformation")
.HtmlAttributes(new { action="Add", method="POST"})
.Items(i => {
i.Add()
.Field(f => f.Description)
.Editor(e => e.Editor().HtmlAttributes(new { contenteditable = false }))
.Label(l => l.Text(SharedHtmlLocalizer["Description"].Value))
.InputHtmlAttributes(new { data_val_required = string.Format(Localizer["TheField_Name_IsRequired"], Localizer["Description"]), contenteditable=ViewBag.IsEdit });
}
)
)
How can I disable this Editor through the Fluent API? If that isn't possible, how can I disable it via javascript (specifically jQuery)?