简而言之,在Jquery Datables中启用scrollX / scrollY会隐藏列过滤器插件:https://github.com/vedmack/yadcf/issues/43

我在这里放置了一些代码:

http://jsfiddle.net/LAeVx/6/


我的主要代码:

$('#displayList').dataTable({
                "bServerSide": false,
                "bJQueryUI": true,
                "asStripClasses": ['even', 'odd ui-state-default'],
                "oLanguage": { "sProcessing": "<div class='processing-div ui-state-focus w120 ui-corner-all'><div style='float:left;'><img src='Styles/images/Spinner.gif'></div><div style='float:left;margin:10px 5px;'>Loading...</div><div class='cleardiv'></div></div>" },
                "oLanguage": { "sZeroRecords": "No dlns available", "sEmptyTable": "No dlns available" },
                "bProcessing": true,
                "bDeferRender": true,
                "bLengthChange": true,
                "bDestroy": true,
                "bFilter": true,
                "sPaginationType": "full_numbers"
            }).yadcf([{
                column_number: 0,
                filter_type: "text"
            }, {
                column_number: 1,
                filter_type: "text"
            }, {
                column_number: 2,
                filter_type: "text"
            }, {
                column_number: 3,
                filter_type: "text"
            }, {
                column_number: 4,
                filter_type: "text"
            },
             {
                column_number: 5,
                filter_type: "text"
            },
            {
                column_number: 6,
                filter_type: "text"
            },
            {
                column_number: 7,
                filter_type: "text"
            },
            {
                column_number: 8,
                filter_type: "text"
            },
            {
                column_number: 9,
                filter_type: "text"
            },
            {
                column_number: 10,
                filter_type: "text"
            },
            {
                column_number: 11,
                filter_type: "text"
            },
            {
                column_number: 12,
                filter_type: "text"
            },
            {
                column_number: 13,
                filter_type: "text"
            },
            {
                column_number: 14,
                filter_type: "text"
            },
            {
                column_number: 15,
                filter_type: "text"
            },
            {
                column_number: 16,
                filter_type: "text"
            },
            {
                column_number: 17,
                filter_type: "text"
            },
            {
                column_number: 18,
                filter_type: "text"
            },
            {
                column_number: 19,
                filter_type: "text"
            },
            {
                column_number: 20,
                filter_type: "text"
            },
            {
                column_number: 21,
                filter_type: "text"
            },
             {
                column_number: 22,
                filter_type: "text"
            }]);


有没有人能够为此插件实现水平滚动?我无法找到适合我的解决方案。

最佳答案

从0.8.5.beta.4版本开始,yadcf确实支持sScrollX / sScrollY(和scrollX / scrollY),您可以grab it from here

10-07 17:55