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

Remove child rows from Buttons Datatable results


  • XanaduDev
    Participant

    Posts: 19
    Member Reply #7062

    Hello,

    We’re using metronics_v4.5.6 admin1_layout and every time we create a Buttons Datatable the last column of each row becomes a child row. Is there a way to remove the child row and make it a normal column?

    Here’s a snippet of the datatable init


    var oTable = table.dataTable({

    // Internationalisation. For more info refer to http://datatables.net/manual/i18n
    "language": {
    "aria": {
    "sortAscending": ": activate to sort column ascending",
    "sortDescending": ": activate to sort column descending"
    },
    "emptyTable": "No data available in table",
    "info": "Showing _START_ to _END_ of _TOTAL_ entries",
    "infoEmpty": "No entries found",
    "infoFiltered": "(filtered1 from _MAX_ total entries)",
    "lengthMenu": "_MENU_ entries",
    "search": "Search:",
    "zeroRecords": "No matching records found"
    },
    buttons: [
    { extend: 'print', className: 'btn dark btn-outline' },
    { extend: 'copy', className: 'btn red btn-outline' },
    { extend: 'pdf', className: 'btn green btn-outline' },
    { extend: 'excel', className: 'btn yellow btn-outline ' },
    { extend: 'csv', className: 'btn purple btn-outline ' },
    { extend: 'colvis', className: 'btn dark btn-outline', text: 'Columns'}
    ],
    // setup responsive extension: http://datatables.net/extensions/responsive/
    responsive: true,
    "order": [
    [0, 'asc']
    ],
    "lengthMenu": [
    [5, 10, 15, 20, -1],
    [5, 10, 15, 20, "All"] // change per page values here
    ],
    // set the initial value
    "pageLength": 5,
    "dom": "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable

    });

    Thank you.

    Attachments:
    You must be logged in to view attached files.
    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #7078

    Hi,

    To disable this feature you should remove “responsive: true” parameter from the above code since this feature turns on the responsive datatable extension. If you need any further clarifications please let us know.

    Thanks.


    XanaduDev
    Participant

    Posts: 19
    Member Reply #7079

    Got it! Thanks!

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #7099

    You are welcome. Good luck with your project 🙂

You must be logged in to reply to this topic.