File Export

File Export

Abhinav123Abhinav123 Posts: 3Questions: 1Answers: 0

I am using the following filter to search columns.

$(document).ready(function() {
$('#example').DataTable( {
initComplete: function () {
this.api().columns(0).every( function () {
var column = this;
var select = $('<select><option value=""></option></select>')
.appendTo( $(column.footer()).empty() )
.on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);

                    column
                        .search( val ? '^'+val+'$' : '', true, false )
                        .draw();
                } );

            column.data().unique().sort().each( function ( d, j ) {
                select.append( '<option value="'+d+'">'+d+'</option>' )
            } );
        } );
    }
} );

} );

I want to add export to xls button but I am facing difficulties. Please suggest me how do i add to above.'

Answers

  • Abhinav123Abhinav123 Posts: 3Questions: 1Answers: 0

    am newbie to these, so please let me know as earliest.

  • Abhinav123Abhinav123 Posts: 3Questions: 1Answers: 0
    edited May 2016

    hmmm

  • allanallan Posts: 63,794Questions: 1Answers: 10,514 Site admin
    edited May 2016

    You waited two minutes before bumping your post and then another three before doing it again? If it is that urgent, priority support is available.

    Otherwise, please link to a test case as the forum rules clearly state. I don't see where you are using Buttons anywhere in the above code. I would suggest you have a look at the documentation and its examples.

    Allan

This discussion has been closed.