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

193
Views
Cómo obtener el índice de fila de la casilla de verificación ag-grid

Tengo una tabla ag-grid que tiene casillas de verificación en cada fila. Cuando hago clic en una casilla de verificación, quiero poder determinar el índice de la fila.

Yo he tratado:

 onRowClick(event: any): void { console.log(event.rowIndex); }

y este tipo de obras, pero no realmente. Si hago clic en la fila, obtendré el índice; sin embargo, si hago clic en la casilla de verificación de esa fila, no obtendré el índice... algo extraño. Necesito obtener el índice de la fila solo cuando se hace clic en la casilla de verificación. ¿Cómo puedo conseguir esto?

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Lo averigué. Para aquellos que buscan, agregue esto a su etiqueta en su HTML.

 (rowSelected)="getRowIndex($event)" [rowMultiSelectWithClick]="true"

En su archivo ts, agregue:

 public getRowIndex(event : any) { if(event.node.selected) { this.rowIndex = event.node.rowIndex; }
about 4 years ago · Santiago Gelvez 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!