in Education by
$('#some-table').DataTable({ "language": { "url": "{{ asset('/js/plugins/lang.json') }}" }, "ordering": false, "scrollX": true, "scrollCollapse": false, "searching": false, "processing": true, "serverSide": true, "scrollY": 400, "ajax": { "url": "/ajax/url", "type": "POST", "data": function ( d ) { d.some_parametr = '123'; } }, "columns": [ {data: 'some_category', name: 'table.some_category'}, {data: 'day.1', name: 'table.day'}, {data: 'day.2', name: 'table.day'}, {data: 'day.3', name: 'table.day'}, {data: 'day.4', name: 'table.day'}, ... {data: 'day.30', name: 'table.day'}, {data: 'day.31', name: 'table.day'}, ], "initComplete": function (settings, json) { var api = this.api(); if ( json.extra ) { var stat_day; for (var i = 1; i < 32; i++) { stat_day = json.extra.stat.day[i]; $(".dataTables_scrollFootInner table tfoot tr").append($('') .html(stat_day) ); } } // Sync TFOOT scrolling with TBODY $('.dataTables_scrollFoot').on('scroll', function () { $('.dataTables_scrollBody').scrollLeft($(this).scrollLeft()); }); } When the page is loaded columns borders are not the same: After you change the browser window size - all the columns aligned: How to make so that when the page is loaded, the columns of the tables were aligned? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Try this: columnDefs: [ { width: 200, targets: 0 } // this will set width of first column ], fixedColumns: true // this will set the column width to fixed

Related questions

0 votes
    $('#some-table').DataTable({ "language": { "url": "{{ asset('/js/plugins/lang.json') }} ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    I have minified all my js files using require, but require created a minified js file( main.min.js ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I have minified all my js files using require, but require created a minified js file( main.min.js ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 16, 2022 in Education by JackTerrance
0 votes
    How do I change width of this drop down menu, as you can see it's too small. When I select 10 ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I don't know how initialize a backing bean only when page loads, I am using Spring and ICEfaces. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Please refer to my test case https://jsfiddle.net/1c3Lmace/13/ This is my code $(document).ready( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I wanted to reduce the width of the columns so that become fit. The table is irregular due to with some columns ... , value = record ) Select the correct answer from above options...
asked Jan 17, 2022 in Education by JackTerrance
0 votes
    I made a JQuery function the one deletes the row I selected. I know that the option exist in the DataTables option, but I want to ... }*/ });}); Then, I have the JSON file there:...
asked Jul 3, 2022 in Education by JackTerrance
0 votes
    I made a JQuery function the one deletes the row I selected. I know that the option exist in the DataTables option, but I want to ... }*/ });}); Then, I have the JSON file there:...
asked Jun 19, 2022 in Education by JackTerrance
0 votes
    Course Results (${courseResponseList.getCourses().size()}) Want to show above div. jquery script. jQuery. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    Course Results (${courseResponseList.getCourses().size()}) Want to show above div. jquery script. jQuery. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I want to bind two data frames with different set of columns and I also want to retain all the columns that fails to ... do that in R? Select the correct answer from above options...
asked Jan 23, 2022 in Education by JackTerrance
0 votes
    4. It indicates the key to the different colours used to shade the columns in a chart. 5. Name at the top ... of the chart. 6 Comhinn Select the correct answer from above options...
asked Dec 30, 2021 in Education by JackTerrance
0 votes
0 votes
    I have a relative layout that has an ImageView and and a textview aligned to right of the ImageView. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
...