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

Removing title from export buttons

$
0
0

I am using the following datatables example for the purpose of export button. However, i am unable to remove title from the excel export by changing title:''. The code is as follows:

    <script type="text/javascript">

        $(document).ready(function () {
            $('#table_id tfoot th').each(function () {
              var title = $(this).text();
              $(this).html('<input type="text" placeholder="' +  + '" />');
            });

            var table = $('#table_id').DataTable({
                responsive: true,
                stateSave: true,
                "deferRender": true,
                "paging": true,
                "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
                stripeClasses: false,
                "pageLength": 50,
                dom: 'Blfrtip',
                buttons: [
                    {
                        extend: 'collection',
                        text: 'Export',
                        buttons: [
                            'copy',
                            'excel',
                            'csv',
                            'pdf',
                            'print',
                        ],
                       title: ' ',
                    }
                ],

                columnDefs: [
                    {
                        targets: "_all",
                        className: 'dt-center'
                    }
                ]
            });

            table.columns().every(function () {
                var that = this;

                $('input', this.footer()).on('keyup change', function () {
                    if (that.search() !== this.value) {
                        that
                            .search(this.value)
                            .draw();
                    }
                });
            });
            $('#table_id').show();
        });
    </script>

Viewing all articles
Browse latest Browse all 82115

Trending Articles



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