customize one table to remove search,button,pagelength

customize one table to remove search,button,pagelength

eems_developereems_developer Posts: 6Questions: 3Answers: 0

I'm building a Laravel app with AdminLTE integrated in the backend. AdminLTE uses DataTables to generate the tables, this works fine. But i need particulae table to remove search,button,pagelength

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    You can do that with dom - there's a few examples on that page demonstrating that.

  • eems_developereems_developer Posts: 6Questions: 3Answers: 0
    edited November 2019

    My real code on the page

    var tableaprim = $('adm_primary_tb').DataTable({
                      paging:false, bFilter  : false,
    
    
                          'columnDefs': [  {orderable: false,
                                className: 'select-checkbox',
                                      targets: 0
                                      }
    
                        ],
                        'select': {
                           style: 'multi',
                           selector: 'td:first-child'
                        }
    
        });
    

    _
    i get customized but

    but error came
    _

    **DataTables warning: table id=adm_primary_tbl - Requested unknown parameter '1' for row 0. For more information about this error, please see http://datatables.net/tn/4
    **

    but i need change my code like this

    var tableaprim = $('adm_primary_tb').DataTable({
                      paging:false, bFilter  : false,
    if ($(this).hasClass('dt-select')) {
    
                          'columnDefs': [  {orderable: false,
                                className: 'select-checkbox',
                                      targets: 0
                                      }
    
                        ],
                        'select': {
                           style: 'multi',
                           selector: 'td:first-child'
                        }
    }
        });
    
    

    **
    the default table came
    i cant customised **

    Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • colincolin Posts: 15,144Questions: 1Answers: 2,586
    Answer ✓

    You haven't used the dom setting that I mentioned - example here.

This discussion has been closed.