Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

170
Vistas
How to add hidden data to each row during creation in tabulator

I am building table with Tabulator5.2, I need to pass some data to each row as hidden data like DB_ID ..etc example:-

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

In order to get the whole data when calling row.getData() or another method.

Let me share how i build the table.

This is the table headers..

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 }
]

This is table Data:-

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++ 
    }

& this is the function which responsible to add the rows.

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)
                    
                }
            }
        }

Once all rows added to the dict. Finally build the table.

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

So kindly how is it possible to add some hidden data to each row ?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda