Buttons not appearing for server side datatable

Buttons not appearing for server side datatable

azulahimeazulahime Posts: 6Questions: 3Answers: 1

I created a datatable that's using server side processing. It's working. However, when the data loads, the buttons for exporting files do not show up on the datatable. I know that the problem is not with the button versions that I'm using because on another page, I have a client side datatable and when data is loaded on that table, the buttons appear.

Below is the code that i'm using right now. Can someone provide me with some insight on how to solve this? Thanks!

    var table = $('#example').DataTable( {
            "initComplete": function(settings, json) {
              table.buttons().container()
              .appendTo( $('div.column.is-half', table.table().container()).eq(0) );
              alert( 'All Data has been loaded into the table successfully' );
            },
            scrollX: true,
            lengthChange: false,
            "pageLength":5000, 
            buttons: [ 'excel' ],
            serverSide: true,
                    sAjaxSource: "http://127.0.0.1:8000/sctagging/materialtaggingdata/",  // new url
            columns: columndata,

          } );

This question has an accepted answers - jump to answer

Answers

  • azulahimeazulahime Posts: 6Questions: 3Answers: 1
    Answer ✓

    Hi, nevermind, it works now

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Thanks for posting back - good to hear you've got it working now.

    Allan

Sign In or Register to comment.