Kendo Grid Custom Editor PopUP editor with rich text editor not saving

2 posts, 0 answers
  1. Subodh
    Subodh avatar
    1 posts
    Member since:
    Mar 2013

    Posted 30 Apr 2017 Link to this post

    Hi, 

    I'm using existing sample project posted on net for Kendo grid with custom pop up editor. This works fine. That means Adding/Editing records works.

    However , as per requirement Instead of standard textbox, we are suppose to use rich text box editor. So, when I use RTE (Rich text editor) for adding /editing records it works fine only

    1. If I do not apply any of the RTE functionality (E.g. Bold/Italic/underline).

    however when I apply any RTE functionality (E.g. Bold or Italic or underline) on text  and click on Update  then  following things happens ,

    1.As soon as I move my cursor control out of RTE then behind the scene grid show that entry  with little red mark (which also happens above case as well)

    2. However no Control action method  gets called and Pop up window never closes.

     

    Please note, I tried with different Permutation and combinations of  .Encode() but it didn't worked. Pop up window never closes and no controller action methods gets called.

    I'm attaching  my code images and output.

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2478 posts

    Posted 02 May 2017 Link to this post

    Hi Subodh,

    If you would like to display HTML in the Grid columns you should set the Encoded property for the column to false

    columns.Bound(c => c.Name).Encoded(false);

    To enable entering HTML in the Editor widget you should add ViewHtml to the Tools.


    @Html.Kendo().EditorFor(model=>model.Name).Encode(true).Tools(t=>t.ViewHtml())

    The edit form is not closed because there would be validation error. By default code containing < and > symbols is considered potentially dangerous. In order to enable such code to the server you can add AllowHtml annotation to the field in the Model.

    If you would like more information on Request Validation you would find the article below interesting.




    Regards,
    Viktor Tachev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top