Hi,
If any of the kendo grid cell has overflowing content (horizontal or vertical scroll), I want to have that text copied to a clipboard by showing a 'copy to clipboard' icon on that specific cell, when mouse is hovered over that data cell.
When trying to achieve this, I call a (mouseover) event and check if the element hovered on has overflow. If it does, I set a variable 'hasOverflow' to true and use this to conditionally show the icon.
But the problem is I don't have access to specific cell, because kendo automatically renders them for us.
<div *ngFor column of columns>
<ng-template kendoGridCellTemplate let-dataItem let-column="column">
<div (mouseover) = setCellOverflow($event)><pre>{{dataItem[column.field]}}</pre></div>
<i *ngIf= "hasOverflow">icon</i>
</ng-template>
</div>
Script::
setCellOverflow(event) {
if(event.scrollHeight < event.clientHeight) hasOverflow = true; //instead of setting hasOverflow for every cell, want to set it for specific cell
}