Data Table Print Button
Data Table Print Button
 mrshahidamin            
            
                Posts: 5Questions: 1Answers: 0
mrshahidamin            
            
                Posts: 5Questions: 1Answers: 0            
            
            
                            
                                  in Buttons             
        My JS is here:
 $(document).ready(function () {
        $("#GridViewReport").prepend($("<thead></thead>").append($("#GridViewReport").find("tr:first"))).dataTable({
            "paging": true,
            "ordering": true,
            "order": [[7, "desc"]],
            "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
               buttons: [
            'print'
        ]
        });
    });
I am not getting any errors in my console, but the print button is still missing on my page!
This discussion has been closed.
            
Answers
Are you including the Buttons extension?
https://datatables.net/extensions/buttons/
As well as checking the files as tangerine suggested, you also need to include 'B' in
dom,Colin
@tangerine
Yes, all files are included in the project.
dom: 'Bfrtip',Thanks, it's fixed!
@colin Data table buttons are not showing with delete row functionality. Any help?
I suspect it's something to do with that first line, and how you're initialising the table - I imagine you're initialising two tables, with line 56 being the second without the
-iotion dom.If that doesn't help, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
@colin thanks for your kind help and prompt response. That issue was due to the sequence of JS files included in the project!