New to Kendo UI for Angular? Start a free 30-day trial
EditTemplateDirective
Lets you customize the content of edited cells by providing a column edit-cell template for the Grid (see example).
Place an <ng-template> tag with the kendoGridEditTemplate directive inside a <kendo-grid-column> tag to define the template.
The template context includes:
formGroup—The current FormGroup. This is the default context for template variables usinglet-x, such aslet-formGroup. If you use the Grid in Template-Driven Forms, this isundefined.rowIndex—The current data row index. For a new item row,rowIndexis-1. Uselet-rowIndex="rowIndex"to access it.dataItem—The current data item. Uselet-dataItem="dataItem"to access it.column—The current column instance. Uselet-column="column"to access it.isNew—The state of the current item. Uselet-isNew="isNew"to access it.
html
<kendo-grid-column>
<ng-template kendoGridEditTemplate let-formGroup="formGroup" let-dataItem="dataItem">
<kendo-textbox [formControl]="formGroup.get('field')"></kendo-textbox>
</ng-template>
</kendo-grid-column>
Selector
[kendoGridEditTemplate]