Datatable plugin - jquery - column redistribution is regulated relative to another column. How to avoid this?

In the table data plugin, while I reinstall any column with a large size (width), I want to keep the column width and enable horizontal scrolling only when the width is greater than some value (this is the value I defined).

While now he is relatively adjusting the other column and is fixed at 100%.

Can anyone help with this?

 // all task view table generation script
var allTaskTable;
allTaskTable = $('#AllTaskTable').dataTable({
    "fnDrawCallback": function (AllTaskSettings) {
        if (AllTaskSettings.aiDisplay.length == 0) {
            return;
        }
    }, "sPaginationType": "full_numbers",
    "sDom": 'Rlr<"tableContainer"t>ip',
    "aaSorting": [[9, "asc"]],//Default sorting is on column 9, desc
    "aoColumnDefs": [
        { "bSortable": false, "aTargets": [0, 1] }//Do not sort on column 0 and 1, which are the radio button and context menu
    ],
    "bRetrieve": true,
    "bDestroy": true,
    "bPaginate": true,  // this line of code for header freeze
    //"bFilter": true,
    //"sScrollY": "580",
    //"sScrollX": "100%",
    //"sScrollXInner": "100%",
    //"bScrollCollapse": true
    "autoWidth": false

});
+4
source share
1 answer
"scrollY": "200px",
"scrollCollapse": true,

Link: https://datatables.net/examples/api/tabs_and_scrolling.html

Hope this is what you are looking for

0
source

Source: https://habr.com/ru/post/1548314/


All Articles