This is a migrated thread and some comments may be shown as answers.

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

1 Answer 511 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Subodh
Top achievements
Rank 1
Subodh asked on 30 Apr 2017, 10:22 PM

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.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 02 May 2017, 02:13 PM
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.
Tags
Grid
Asked by
Subodh
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or