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

169
Views
Cómo agregar datos ocultos a cada fila durante la creación en tabulador

Estoy construyendo una tabla con Tabulator5.2, necesito pasar algunos datos a cada fila como datos ocultos como DB_ID ..etc ejemplo:-

 {'extrId' : 10 , 'connectionDbIndex' : 101 }

Para obtener todos los datos al llamar a row.getData() u otro método.

Déjame compartir cómo construyo la mesa.

Estos son los encabezados de la tabla..

 var tableHeaders = [ {formatter:"rowSelection", width:20 , titleFormatter:"rowSelection", hozAlign:"left", headerSort:false, cellClick:function(e, cell){cell.getRow().toggleSelect();}} , {title:'id", field:"ID" , hozAlign:"left" ,responsive:2 , headerFilter:'input', headerFilterLiveFilter:true ,headerSort:false } ]

Esta es la tabla de datos: -

 var i = 0 counter = 2000 while (i < counter){ var more = {'DB_ID' : 2012 } var row = {id:1+i, name:"Oli Bob"+i, progress:12, gender:"male"+i, rating:1, col:"red", dob:"19/02/1984", car:1 , site:'new' , ticket:12 , opened:false , cssClass:class2.randomId() , data : {'s' : 10}} class2.insert_row(row , more) i++ }

& esta es la función responsable de agregar las filas.

 insert_row(payload , more){ this.tableContent.push(payload) this.rowMoreData.push(more) for (let key in payload ){ var headerLabel = key if (! this.alreadyColumsAdded.includes(headerLabel)){ this.alreadyColumsAdded.push(headerLabel) var a = {title:headerLabel, field:headerLabel , hozAlign:"left" ,responsive:2 , headerFilter:'input', headerFilterLiveFilter:true ,headerSort:false } this.tableHeaders.push(a) } } }

Una vez que todas las filas se agregaron al dict. Finalmente construye la mesa.

 var table = new Tabulator(this.tableId, this.tableOptions);

Entonces, ¿cómo es posible agregar algunos datos ocultos a cada fila?

about 4 years ago · Juan Pablo Isaza
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!