I've implemented in-cell editing with a dropdownlist using reactive forms and a cellclick event handler. How can I also automatically open/expand the dropdownlist on cell edit? The dropdownlist has a Toggle method that will open it but I can't reference the dropdownlist to invoke it. The sender of the cellclick event only includes the grid component.
Markup:
<
kendo-grid-column
field
=
"manufacturer"
title
=
"Manufacturer"
width
=
"130"
[locked]="true">
<
ng-template
kendoGridEditTemplate
let-dataItem
=
"dataItem"
let-formGroup
=
"formGroup"
>
<
kendo-dropdownlist
[data]="manufacturers"
textField
=
"text"
valueField
=
"value"
[valuePrimitive]="true" [formControl]="formGroup.get('manufacturer')">
</
kendo-dropdownlist
>
</
ng-template
>
</
kendo-grid-column
>
Script:
public cellClickHandler({ sender, rowIndex, columnIndex, dataItem, isEdited }) {
if
(!isEdited) {
sender.editCell(rowIndex, columnIndex,
this
.createFormGroup(dataItem));
}
}
Dropdownlist method I'd like to invoke on cell edit:
this
.dropdownlist.toggle(
true
);