Hi,
currently I'm evaluating/experimenting with the kendo grid. I have a question regarding grid editing. I read, that we can use the directive 'kendoGridInCellEditing' to simplify our code base and avoid bolierplate codes. But in this case if we click on a cell, the cell goes automatically in edit mode. Alternatively we can use the 'manual' mode and write all the boilerplate code. I found a feature request on this topic: https://feedback.telerik.com/kendo-angular-ui/1661188-provide-an-option-for-activating-in-cell-editing-on-double-click
I investigated the internal methods of the grid and did the following:
this.grid.cellClick.subscribe((cellClickEvent) => {
this.grid.closeCell();
});
With this piece of code, the grid won't go in edit mode. This is fine, but regardless of this, if we inspect f. e. the grid row element in the browser debug mode, then we see, that after clicking on a cell, the row element is updated. The question is, how we can prevent it, while having the 'kendoGridInCellEditing' still active?
In the meantime I discovered, that the updating of the row element occurs also in any other cases if the cell goes in edit mode. In the kendo source code there should be some logic, which updates the 'tr' element of the grid. I guess this is because an editor is showing in the grid. How can we avoid this update? The background of my question is, that I do some DOM manipulation inside the grid, and every time, if the grid goes in edit mode, this manipulations are gone, because the 'tr' element gets refreshed.
Hi Peter,
What our team generally suggests is to use kendoGridCellTemplate and wrap the cell with an element that will use the k-grid-ignore-click to prevent the user from editing the cell.
https://www.telerik.com/kendo-angular-ui/components/grid/editing/in-cell-editing/#toc-disabling-the-click-handler-for-specific-elements
In theory, you could also detect if the user double-clicks (example) a specific cell and programmatically set it to edit mode, but that would require manual in-cell editing.
Regards,
Yanmario
Progress Telerik