New to Kendo UI for Angular? Start a free 30-day trial

In-Cell Editing with TextArea

Pressing the Enter key in In-Cell editing mode typically closes and saves the edited cell. You can customize this behavior when the Enter key needs to serve a different purpose, like adding a new row in a Textarea element. To use the Enter key for inserting new lines in a Textarea custom editor, you can stop the default keyboard events propagation in the edit template and avoid triggering the built-in keyboard shortcuts:

    <kendo-grid-column field="ProductName" title="Product Name">
        <ng-template kendoGridEditTemplate let-dataItem="dataItem" let-formGroup="formGroup">
            <textarea
                [formControl]="formGroup.get('ProductName')"
                kendoGridFocusable
                (keydown.enter)="$event.stopImmediatePropagation()"
                name="ProductName"
                class="k-textbox"
                required
            ></textarea></ng-template
    ></kendo-grid-column>

The following example demonstrates the suggested approach in action.

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?