Kendo Editor from Grid column

1 Answer 37 Views
Editor Grid
Jared
Top achievements
Rank 1
Jared asked on 17 Jul 2024, 03:32 PM

Hello,

 

Is it possible to use a Grid's built-in popup editor to display a Kendo Editor component? I'm finding some solutions that are close, but not quite exactly what I'm looking for. Basically one of the columns in the Grid has a need to allow rich HTML text when creating/editing, and the Kendo Editor seems to be the best way to do this. 

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 22 Jul 2024, 08:59 AM

Hello Jared,

You can set the Editor component as an editor of a specified column as follows:

  • Decorate the model property with the UIHint attribute.
//Model

[UIHint("Editor")]
public string Comments { get; set; }
  • Add a "View" with name that matches the template name in the UIHint attribute (i.e., "Editor") in the ~Views/Shared/EditorTemplates/ folder:
// ~Views/Shared/EditorTemplates/Editor.cshtml

@model string?

@(Html.Kendo().EditorFor(x => x))

As a result, the Editor component will appear in the default Popup editor for the "Name" property.

Regards,
Mihaela
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

Tags
Editor Grid
Asked by
Jared
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or