Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82273

Displaying multiple options above the table

$
0
0

I am very new to web development and need some help.

I want to provide the ability to export my table and print, while also display the option to change the number of rows per page. The problem is that my buttons are being displayed on top of my drop down menu.

<script>
$(document).ready(function () {
    $('#monthly').DataTable({

        "iDisplayLength": 25,
        "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]],

        dom: 'Bfrtip',
        buttons: ['print', 'excelHtml5', 'csvHtml5'],

        responsive: {
            details: {
                display: $.fn.dataTable.Responsive.display.modal({
                    header: function (row) {
                        var data = row.data();
                        return 'Details for ' + data[0] + ' ' + data[1];
                    }
                }),
                renderer: $.fn.dataTable.Responsive.renderer.tableAll({
                    tableClass: 'table'
                })
            }
        }

    });
})
</script>

Thanks in advance for any help you can provide!


Viewing all articles
Browse latest Browse all 82273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>