How to add button above and below a table

How to add button above and below a table

EitanEitan Posts: 3Questions: 2Answers: 0

I would like to add the CSV button to the top and bottom of the table. Currently, the button is only on the top. How do you also add it to the bottom?
Right now my code is:

opentable = $("#open").dataTable( {
    dom: "Bfrtip",
    "data": openData,
    "columns": [{
        data: "severity", render: function (data, type, row) {
            if (type === 'export') {                             
                return data;                         
            } else {                             
                // return ...;                          
        }           
    }],          
    "paging": true,          
    "searching": true,          
    buttons : [{              
        extend: 'csv',              
        exportOptions: {                  
            columns: [0,1,2,3,4,5,6,7,8,9,10], orthogonal: 'export'              
        }           
    }]         
});

Answers

  • EitanEitan Posts: 3Questions: 2Answers: 0

    @allan I'm still looking for help here and would really appreciate your input when you have the time.

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    This is an answer out there where the developer simply cloned the button container from the top of the table to the button container at the bottom of the container with the initComplete callback handler.

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    Based on that thread I created http://jsbin.com/socitiy/53/edit

This discussion has been closed.