I have an error when grid component is set a context menu. Took the grid-context-menu.component.ts code and pasted as is from tutorial, but it errors out in that file while setting cellclick input for #grid. Please find the attached image for error.
To build a context menu for grid, I was following the implementation at https://www.telerik.com/kendo-angular-ui/components/grid/advanced-features/context-menu
my gridcomponent:
<kendo-grid #grid
[data]="gridView"
(cellClick)="cellClickHandler($event)"
(cellClose)="cellCloseHandler($event)">
<grid-context-menu [for]="grid" [menuItems]="contextmenuItems" (select)="onContextMenuClick($event)">
</grid-context-menu>
Error part: grid-context-menu.component.ts
@Input() public set for(grid: GridComponent) {
this.unsubscribe();
this.cellClickSubscription = grid.cellClick.subscribe(this.onCellClick);
}
Note: Even my grid component is named 'GridComponent' same as the one in gridModule. Thought that would be an issue and tested by renaming it. But found thats not an issue.