Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

729
Views
Kendo Angular - How to get data on the doubleClick event on Kendo Grid?

How to get data on the doubleClick event on Kendo Grid?

I would like to get the same object that I fetch at the selected event, which would be dataitem in the position of IndexRowSelected

Html:

<kendo-grid
    #myGrid
    [data]="gridData"
    [selectable]="true"
    (selectionChange)="onSelection($event)"
    (dblclick)="doubleClickHandler(myGrid, $event)">
</kendo-grid>

TS:

onSelection(event){
   //dataItem at row selected
   event.selectedRows[0].dataItem
}

doubleClickHandler(grid, event){

//get dataItem like onSelection function

}

dataItem object example: [{ "id":0, "name":"Chai", "category": "Beverages", "price": "18", "instock": "39"

}] enter image description here thanks,

Federico

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

What I would do is handle the SelectionChange event (documentation) to get the dataItem from the selected row and then store the value in a private variable.

Then when you handle the double-click event, you'd simply reference the private variable's value.

Component's Template:

<kendo-grid [data]="gridData"
            [height]="410"
            [selectable]="true"
            (dblclick)="onGridDoubleClicked()"
            (selectionChange)="onGridSelectionChanged($event)">
    <!-- column definitions... -->
</kendo-grid>

Component's Typescript:

private selectedRecord: any | undefined;
onGridDoubleClicked(): void {
  // do something with this.selectedRecord
}

onGridSelectionChanged(e: SelectionEvent): void {
  if (!e.selectedRows?.length) {
    return;
  }
  this.selectedRecord = e.selectedRows[0].dataItem;
}

Example: https://stackblitz.com/edit/angular-n4cn9w-phvv6a?file=app%2Fapp.component.ts

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!