javascript - Datatables fixed columns scrollbar issue - Stack Overflow

I have a table on which I am using the DataTables FixedColumns plugin. I'd like for the scroll bar

I have a table on which I am using the DataTables FixedColumns plugin. I'd like for the scroll bar to resize to be only underneath the non-fixed columns, as it is in the example page here: .html

While using the exact same code, I am unable to make this work. Based on some remendations in the forums, I switched to the nightly builds of DataTables and FixedColumns, but that has not gotten me anywhere.

Illustration of the problem: /

Code:

$(document).ready( function () {
    var oTable = $('#example').dataTable( {
        "sScrollY": "300px",
        "sScrollX": "100%",
    "sScrollXInner": "150%",
        "bScrollCollapse": true,
        "bPaginate": false
    } );

    new $.fn.dataTable.FixedColumns( oTable );
} );

Any ideas?

I have a table on which I am using the DataTables FixedColumns plugin. I'd like for the scroll bar to resize to be only underneath the non-fixed columns, as it is in the example page here: https://datatables/release-datatables/extras/FixedColumns/index.html

While using the exact same code, I am unable to make this work. Based on some remendations in the forums, I switched to the nightly builds of DataTables and FixedColumns, but that has not gotten me anywhere.

Illustration of the problem: http://jsfiddle/Ue6Gn/1/

Code:

$(document).ready( function () {
    var oTable = $('#example').dataTable( {
        "sScrollY": "300px",
        "sScrollX": "100%",
    "sScrollXInner": "150%",
        "bScrollCollapse": true,
        "bPaginate": false
    } );

    new $.fn.dataTable.FixedColumns( oTable );
} );

Any ideas?

Share asked Apr 2, 2014 at 14:37 John ChrysostomJohn Chrysostom 3,9831 gold badge42 silver badges55 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

Give a background colour to your header, in your case, give white. I faced the same issue. It worked for me.

You need to provide the appropriate DataTables CSS files in your html resources.

<link rel="stylesheet" type="text/css" href="//cdn.datatables/1.10.1/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables/fixedcolumns/3.0.2/css/dataTables.fixedColumns.css">

You can reference them here or find them in the latest version

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744856900a4597461.html

相关推荐

  • javascript - Datatables fixed columns scrollbar issue - Stack Overflow

    I have a table on which I am using the DataTables FixedColumns plugin. I'd like for the scroll bar

    2天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信