Reputation: 575
I'm using Angular2 & TS withkendo-grid
and it allows to get the data of the clicked row, but only for
singleClick => (cellClick)="onCellClick($event.dataItem)"
, not doubleClick => (dblclick)="onDblClick(<<CANNOT_GET_ROW_DATA_HERE>>)
How to an event on dblclick, not cellClick, but with exact row we want?
Upvotes: 0
Views: 531
Reputation: 575
It's very simple.
You've just got to add both event listeners to your <kendo-grid>
options.
<kendo-grid
(cellClick)="onCellClick($event.dataItem)"
(dblclick)="onDblClick()">
and then in your controller
:
class MyClass { clickedRowItem: myObject; ..... }
cellClick
to this field:onCellClick(dataItem: myObject) { this.clickedRowItem = trackerId; }
onDblClick() { this.myFunctionToFire(this.clickedRowItem); }
Upvotes: 0