Hi,
I am trying to use TextEditor as the EditorTemplate for Grid. When I click on Edit the column value is not being passed on the editor. Not sure what I am doing wrong. Any help is appreciated.
TextEditor.cshtml
I am trying to use TextEditor as the EditorTemplate for Grid. When I click on Edit the column value is not being passed on the editor. Not sure what I am doing wrong. Any help is appreciated.
@(Html.Kendo() .Grid<WellsRxWeb.Models.UserNotesModel>() .Name("gridUserNotes") .Columns(columns => { columns.Bound(p => p.NotesId).Title("Id").Visible(false); columns.Bound(p => p.UserName).Title("UserName").Visible(false); columns.Bound(p => p.UserNoteText).Title("Notes").EditorTemplateName("TextEditor"); columns.Bound(p => p.ModifiedBy).Title("Saved By"); columns.Bound(p => p.Modified).Title("Saved").Format("{0:MM/dd/yyyy}"); columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172); }) .ToolBar(toolbar => { toolbar.Create(); }) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Filterable() .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .Filterable() .Reorderable(r => r.Columns(true)) .Resizable(r => r.Columns(true)) .ColumnMenu() .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(o => o.NotesId); model.Field(p => p.UserName).Editable(false); model.Field(p => p.ModifiedBy).Editable(false); model.Field(p => p.Modified).Editable(false); }) .Read(read => read.Action("UserNotes_Read", "User").Type(HttpVerbs.Get).Data("additionalData")) .Create(create => create.Action("UserNotes_Create", "User").Data("additionalData")) .Update(update => update.Action("UserNotes_Update", "User").Data("additionalData")) .Destroy(destroy => destroy.Action("UserNotes_Destroy", "User").Data("additionalData").Type(HttpVerbs.Post)) .Events(events => { events.RequestEnd("gridRequestEnd"); })))TextEditor.cshtml
@model WellsRxWeb.Models.UserNotesModel@(Html.Kendo().EditorFor(model => model.UserNoteText) .Name("TextEditor") .HtmlAttributes(new { style = "width: 740px;height:440px" }))