aureliee123's avatar

print datatable button not showing

I'm trying to print the selected rows in a datatable but i can't manage to make the buttons appear i literally tried everything

$('[data-ride="datatables"]').each(function() {

    //var table = $(this).DataTable();
    $(this).on( 'click', 'tr', function () {
            $(this).toggleClass('selected');
                
        } )

    var tab = $(this).DataTable( {
            "dom": 'Bfrtip',
            "bProcessing": true,
            select:true,
            "sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
            buttons:[ "print"]
0 likes
2 replies
a4ashraf's avatar

Hello @ikram_aurelie

I could not understand how you are implementing the data table code in your code

can you share a complete file

Sinnbeck's avatar

Also check your console for any errors (f12 and select the console tab)

Please or to participate in this conversation.