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

370
Views
¿Cómo agregar atributos usando Ag Grid a nivel de fila y celda?

Al igual que podemos agregar la clase CSS usando ag grid. ¿Hay alguna forma en la cuadrícula agrícola de agregar atributos a nivel de fila y celda?

 const gridOptions = { // all rows assigned CSS class 'my-green-class' rowClass: 'my-green-class', // all even rows assigned 'my-shaded-effect' getRowClass: params => { if (params.node.rowIndex % 2 === 0) { return 'my-shaded-effect'; } }, // other grid options ...

Por ejemplo, quiero "my-custom-attr="dummyValue" a continuación

 <div comp-id="44" my-custom-attr="dummyValue" style="transform: translateY(0px); height: 42px;" row-index="0" aria-rowindex="2" class="ag-row-even ag-row-no-focus ag-row ag-row-level-0 ag-row-position-absolute ag-row-first" role="row" row-id="0"><div comp-id="63" class="ag-cell ag-cell-not-inline-editing ag-cell-normal-height ag-cell-value" tabindex="-1" role="gridcell" aria-colindex="2" col-id="sickDays" unselectable="on" style="left: 200px; width: 200px;">4</div></div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Buscaría renders de celdas. https://www.ag-grid.com/javascript-data-grid/cell-rendering/

Luego puede agregar su attr a la celda regresando

 return ( <div my-attr="asdffasdf"> {params.data.cellValue} </div> )
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!