This topic contains 3 replies, has 3 voices, and was last updated by Sean Sean 3 years, 4 months ago.

Datatables NOT WORK


  • feliper
    Participant

    Posts: 11
    Member Reply #4494

    where support? I have a topic and not recevied solution http://keenthemes.com/forums/topic/datatables/ now explain agian, Datatables not working export to PDF, Excel or Print, I make two tests one online and other on localhost, look both:

    online: https://www.youtube.com/watch?v=oRFUaLBq72A

    localhost: https://www.youtube.com/watch?v=2y_eNOs2–k

     

    It concludes that the files work and others do not, is a list:

    table_datatables_ajax.html – NOT WORK

    table_datatables_buttons.html – WORK FINE

    table_datatables_colreorder.html – WORK FINE

    table_datatables_editable.html – NOT WORK

    table_datatables_fixedheader.html – NOT WORK

    table_datatables_managed.html – NOT WORK

    table_datatables_responsive.html – WORK FINE

    table_datatables_rowreorder.html – WORK FINE

    table_datatables_scroller.html – WORK FINE

     

    If you want to test ALL go to: https://www.raveweb.com.br/test/

     

    I am waiting for reply!

    • This topic was modified 3 years, 4 months ago by  feliper.
    • This topic was modified 3 years, 4 months ago by  feliper.

    mmultimedia
    Participant

    Posts: 3
    Member Reply #4501

    Hello feliper.
    I only a member but i hope this comment help you.

    If you want to use print buttons you must define buttons options in DataTables initialization.

    E.g
    var settings = {
    buttons: [{
    extend: ‘print’,
    text: ‘print default’,
    className: ‘btn dark btn-outline’,
    exportOptions: {
    columns: ‘th:visible’
    }
    },
    {
    extend: ‘pdf’,
    text: ‘print pdf’,
    className: ‘btn green btn-outline’,
    exportOptions: {
    columns: ‘th:visible’
    }
    },
    {
    extend: ‘excel’,
    text: ‘print excel’,
    className: ‘btn purple btn-outline’,
    exportOptions: {
    columns: ‘th:visible:not(.row-btn)’
    }
    }]
    };

    $(selector).DataTable(settings);

    Good luck.

    p.s.
    Sorry my bad english.


    feliper
    Participant

    Posts: 11
    Member Reply #4512

    problen is on script, if you test https://www.raveweb.com.br/test/table_datatables_managed.html you see not work, this file no have change = original.

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #4521

    Hi,

    Please note, this demo https://www.raveweb.com.br/test/table_datatables_buttons.html does not have PDF, Excell features.
    The dropdown menu with export options is just static(put for display only) and it does not perform any action.

    If you need a working example of the export features you should download the latest Metronic v4.5.3 version where this already implemented. For more info please check the latest Metronic preview site:
    http://keenthemes.com/preview/metronic/theme/admin_1/table_datatables_buttons.html

    To try it please go to the last table “AJAX DATATABLE” and click on “TOOLS” dropdown menu.

    Thanks.

You must be logged in to reply to this topic.