Grid Column TextEditor as EditorTemplate

2 posts, 0 answers
  1. Vasu
    Vasu avatar
    14 posts
    Member since:
    Jan 2006

    Posted 11 Mar 2015 Link to this post


    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.

          .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(pageable => pageable
                  .Reorderable(r => r.Columns(true))
            .Resizable(r => r.Columns(true))
          .DataSource(dataSource => dataSource
                                              .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"); }))

    @model WellsRxWeb.Models.UserNotesModel
    @(Html.Kendo().EditorFor(model => model.UserNoteText)
          .HtmlAttributes(new { style = "width: 740px;height:440px" })
  2. Dimo
    Dimo avatar
    8486 posts

    Posted 13 Mar 2015 Link to this post

    Hello Sreenivasa,

    Please do not post duplicate support tickets and forum threads.

    The Kendo UI Editor has a Name(), which is different from the model field name. This can't work. Please remove the Name(), as it is not needed in this case.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top