Good evening everyone,
I'm trying to copy the values from the Grid row using the ContextMenu. It works on Kendo's default cells, but it's not working on customized cells.
I made an example and, in it, you can see that it's not possible to get the value (check the console) if you right-click and click Copy. It will return:
{dataItem: undefined, field: undefined}
While in default cells it returns the value normally:
{dataItem: Object, field: "ProductName"}
Furthermore, the 'onContextMenu' in <td/> is presenting an error in TypeScript
Type '(event: MouseEvent<HTMLElement, MouseEvent>, dataItem: any, field?: string) => void' is not assignable to type 'MouseEventHandler<HTMLTableDataCellElement>'
I'm trying to copy the values from the Grid row using the ContextMenu. It works on Kendo's default cells, but it's not working on customized cells.
I made an example and, in it, you can see that it's not possible to get the value (check the console) if you right-click and click Copy. It will return:
{dataItem: undefined, field: undefined}
While in default cells it returns the value normally:
{dataItem: Object, field: "ProductName"}
Furthermore, the 'onContextMenu' in <td/> is presenting an error in TypeScript
Type '(event: MouseEvent<HTMLElement, MouseEvent>, dataItem: any, field?: string) => void' is not assignable to type 'MouseEventHandler<HTMLTableDataCellElement>'
Follow the code
brave-leftpad-tt12no - CodeSandbox