Disable the edit mode specifically

17 Feb 20222 minutes to read

The edit mode of In-place Editor can be disabled by setting the disabled property value to true. In the following sample, when check or uncheck the checkbox, In-place Editor control will disable or enable the edit mode.

<div id='container'>
    <table class="table-section">
            <td> Disabled: </td>
                <ejs-checkbox id="enable" change="onChange" label="Disable" checked="false"></ejs-checkbox>
            <td class="sample-td"> Enter your name: </td>
            <td class="sample-td">
                <ejs-inplaceeditor id="element" mode="Inline" model="ViewBag.model" value="ViewBag.value">

    .table-section {
        margin: 0 auto;

    tr td:first-child {
        text-align: right;
        padding-right: 20px;

    .sample-td {
        padding-top: 10px;
        min-width: 230px;
        height: 100px;
    function onChange(e) {
        var editObj = document.getElementById('element').ej2_instances[0];
        editObj.disabled = e.checked;
public class HomeController : Controller
    public ActionResult Index()
        ViewBag.model = new { placeholder = "Enter some text" };
        ViewBag.value = "Andrew";
        return View();

The output will be as follows.