lfrtip', "tableTools"...">

Data tablet problem with pdf, csv, xls and copy options

sTable = $('#s').dataTable({
        "bVisible":"True",
        "dom": 'T<"clear">lfrtip',        
        "tableTools": {           
            "sSwfPath": "https://cdn.datatables.net/tabletools/2.1.1/swf/copy_csv_xls_pdf.swf",            
            "aButtons": [ 
               "copy", 
               "csv", 
               "xls",            
               "pdf",
               "print",
               "select_all", 
               "select_none" 
            ]
        }
});

      

The buttons render well, but copy, csv, xls, pdf don't work, I don't get any 404s, I checked in the browser console, but I load the totals and buttons container dynamically using a filter button. this may cause problems, please help me.

+3


source to share


2 answers


Finally I got a solution and it works great. The problem was that my buttons are hidden, so, during intialisation, it was not getting the height and width of my pill button. So I created a function for the callback function that adds the width and height of the buttons.



funtion m(){
  $('[id^=ToolTables_] embed').each(function( index ) {
  $(this).attr('width','47px');
  $(this).attr('height','47px');       
  });
  }
      

Run codeHide result


0


source


Your browser The Adobe Flash Player plugin is disabled, disabled for this particular page, or not installed at all.



+2


source







All Articles