We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Editing Template Dialog with RichTextBox

Thread ID:





141206 Nov 29,2018 03:53 PM UTC Dec 3,2018 08:48 AM UTC ASP.NET Core - EJ 2 3
Tags: DataGrid
Patrik Volka
Asked On November 29, 2018 03:53 PM UTC

Hello in the club,

when I paste and edit items in Grid I use Dailog Template. I want RichTextEditor in the Template Dialog, but I can not figure out how to get its content.
All other elements work correctly.

Examples are View, PartialView and Controller.

Thanks for help.

Attachment: GridWithRTE_d1bfa336.zip

Madhu Sudhanan P [Syncfusion]
Replied On December 3, 2018 07:02 AM UTC

Hi Patrik, 

We have checked your query and for  Dialog Edit template, the editors must have the name attribute and both the id and name attribute should has the value as the corresponding field name. But while using RichTextEditor, its editor element (‘textarea’)  id will be added with “-value” string  by RichTextEditor internally. This is the cause of the reported behavior. However you can achieve your requirement by reading the Editor’s value in the actionBegin event of Grid component. Please refer to the below code example, Documentation link and sample link. 

<div class="control-section"> 
    <ejs-grid id="Grid" dataSource="ViewBag.dataSource" actionBegin="actionBegin" actionComplete="actionComplete" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" allowPaging="true"> 
        <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Dialog" template='#dialogtemplate'></e-grid-editSettings> 
        <e-grid-pagesettings pageCount="5 "></e-grid-pagesettings> 
           .  . . 
<script id='dialogtemplate' type="text/x-template"> 
    <div id="dialogTemp"> 
    function actionBegin(args) { 
        if (args.requestType === 'save') { 
            args.data['ShipAddress'] = args.form.querySelector("#ShipAddress-value").value; 

    .  .  . 
    <div class="form-row"> 
        <div class="form-group col-md-12"> 
            <div class="e-float-input e-control-wrapper"> 
                    <ejs-richtexteditor id="ShipAddress" value=@Model.ShipAddress ejs-for="ShipAddress" placeholder="Popis vozu"> 

Madhu Sudhanan P 

Patrik Volka
Replied On December 3, 2018 08:17 AM UTC

Thanks for help

Madhu Sudhanan P [Syncfusion]
Replied On December 3, 2018 08:48 AM UTC

Hi Patrik, 
Please get back to us if you require further assistance. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon