Multiple data in a TD

Multiple data in a TD

raulcoradoraulcorado Posts: 2Questions: 1Answers: 0

Hello friends:

I am using this code with Ajax, and also deferRender: true to load 5900 lines. Figure 1.

I get the table in figure 2.

I want to have two data in the same TD as I show in figure 3.

Thank you very much for your help!

img1
https://photos.app.goo.gl/6F2EivHqdpSbmaql2

img2
https://photos.app.goo.gl/zs4AxdgefolztSvM2

img3
https://photos.app.goo.gl/K2AlwMzgZpGvbgsA2

Answers

  • raulcoradoraulcorado Posts: 2Questions: 1Answers: 0

    I am using this code with Ajax, and also deferRender: true to load 5900 lines. Figure 1.

         $(function(){
              $('#tablacasos').DataTable({
                   "ajax": "c03ajax.php",
                   "deferRender": true, /*USING AJAX AND deferRender*/
                   "mark": true,
                   "paging": true,
                   "lengthMenu": [[15, 25, 100, -1], [15, 25, 100, "TODOS"]],
                   "pageLength": 25,
                   "fnRowCallback": function( nRow, aData, iDisplayIndex ) {
                        
                        if(aData[9]=='RESUELTO' || aData[9]=='CERRADO DESPUES DE VISITA'){
                             /*nRow.className = 'text-success';*/
                             $('td:eq(9)', nRow).html(aData[9]).addClass('text text-success');
                             /*$('td:eq(9)', nRow).html('<span></span>'+aData[9]).find('span').addClass('glyphicon glyphicon-check');*/
                             /*$('#theDiv').prepend($('<img>',{id:'theImg',src:'theImg.png'}))*/
                        } else if((aData[10].indexOf('PROTECCION') !== -1 || aData[10].indexOf('SALUD') !== -1 || aData[10].indexOf('NUTRICION') !== -1 ) && aData[9]=='ABIERTO'){
                             nRow.className = 'text-bold';
                             $('td:eq(10)', nRow).html(aData[10]).addClass('text text-danger');
                             $('td:eq(9)', nRow).html(aData[9]).addClass('text text-danger');
                        } else if(aData[9]=='ABIERTO'){
                             nRow.className = 'text-bold';
                        } else {
                             nRow.className = 'text-muted';
                        }
                                       },
                   "aaSorting": [],
                   // "order": [[0, "desc"]],
                   // "scrollX": true,
                   "info": true,
                   "stateSave": true,
                   "pagingType": "full"
                            }
              });
         });
    

    I want to have two data in the same TD as I show in figure 3. https://photos.app.goo.gl/K2AlwMzgZpGvbgsA2

This discussion has been closed.