如何编辑数据表的位置';s按钮


How to Edit Position of Datatables's Button?

我遇到一个问题,数据表的页面按钮越界。我使用了SB管理模板(引导程序)。我试图编辑我的datatables函数,但它不起作用。我试着在这个函数中JSFiddle,但它不起作用。

我的数据表按钮

我想要这样的数据表:

我想要这个

我试图编辑我的函数,这是我的数据表的函数:

<script>
    $('#datatables').dataTable
        ({  
            "sScrollX": "200%", //This is what made my columns increase in size.
            "bScrollCollapse": true,
            "sScrollY": "800px",
            "bAutoWidth": false,
            "aoColumns": [
                { "sWidth": "5%" }, // 1st column width 
                { "sWidth": "null" }, // 2nd column width 
                { "sWidth": "70%" }, // 3rd column width
                { "sWidth": "null" }, // 4th column width 
                { "sWidth": "null" }, // 5th column width 
                { "sWidth": "40%" }, // 6th column width
                { "sWidth": "null" }, // 7th column width 
                { "sWidth": "null" }, // 8th column width 
                { "sWidth": "null" }, // 9th column width
                { "sWidth": "35%" }, // 10th column width
                { "sWidth": "35%" }, // 11th column width
                { "sWidth": "null" }, //12
                { "sWidth": "null" }, //13
                { "sWidth": "null" }, //14
                { "sWidth": "null" }, //15
                { "sWidth": "null" }, //16
                { "sWidth": "15%" } //17
                ],
            "bPaginate": true,            
            "sDom":'<"H"lCfr>t<"F"ip>',
            //"sDom": '<"search"f><"top"l>rt<"bottom"ip><"clear">',
            "sPaginationType":"full_numbers",
            "aaSorting":[[0, "asc"]],
            "bJQueryUI":true    
        });
</script>

我试着编辑我的sDom,但它不起作用。我使用了这个项目的代码点火器框架。请帮忙。谢谢

您可以更改数据表"sDom"选项以使用引导类,使其适合页面宽度。您也可以尝试更改网格类组合,如col-md-3、col-md--3和col-md-6或任何其他:

{
    "sDom": '<<"col-md-4"f><"col-md-4"l><"col-md-4"i>><trp>'
}
OR
{
    "sDom": '<<"col-md-3"f><"col-md-3"l><"col-md-6"i>><trp>'
}