Search code examples
jquerydatatablestabletools

Datatables Tabletools print mode shows all data. In need of only what was previously displayed


I made Tabletools to work, although I am struggling with the print mode. Once the button is hit, the print mode is run correctly, only displaying the records shown previously. Within a second, the rest of the data is also shown. Has anyone encountered the same issue? Is it possible that my jQuery code is triggering this action? Thanks in advance.


Solution

  • Nevermind guys, I have just found my answer in the functionality site.

    $(document).ready( function () {
    $('#example').dataTable( {
        "sDom": 'T<"clear">lfrtip',
        "oTableTools": {
            "aButtons": [
                {
                    "sExtends": "print",
                    "bShowAll": false
                }
            ]
        }
    } );
    

    } );