Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 数据表:';bAutoWidth:false';当'时不工作;sScrollY';设定_Jquery_Datatable - Fatal编程技术网

Jquery 数据表:';bAutoWidth:false';当'时不工作;sScrollY';设定

Jquery 数据表:';bAutoWidth:false';当'时不工作;sScrollY';设定,jquery,datatable,Jquery,Datatable,我使用datatables在页面加载后重新格式化已经存在的表/DOM。我已经在thead <table border="1" style="table-layout: fixed; word-wrap: break-word;" id='myTable'> <thead> <tr>

我使用datatables在页面加载后重新格式化已经存在的表/DOM。我已经在
thead

  <table border="1" style="table-layout: fixed; word-wrap: break-word;"
                    id='myTable'>
                    <thead>
                        <tr>
                            <th>GroupName</th>
                            <th style='width: 60%;'>Grouped By </th>
                            <th style='width: 15%;'>Count</th>
                            <th style='width: 25%;'>Download</th> 
                        </th>
                    </thead>
                    <tbody>....</tbody>
 </table>
问题是-当设置
sScrolly
时,datatables会自动计算宽度,并为所有列设置相等的宽度,因为
bAutoWidth
设置为false。禁用时,列宽将根据百分比进行适当设置。 有没有关于如何让它工作的建议


谢谢

我在datatables论坛上发布了这个问题,并从作者那里得到了答案/修复。 以防有人在这里偶然发现

oTable = jq("#myTable").dataTable(
     {
        "bSort" : false,
        "bLengthChange" : false,
        "bJQueryUI" : true,
        "bPaginate" : false,
        "sScrollY": "200px",
        "bAutoWidth": false // Disable the auto width calculation 
    }).rowGrouping(
    {
        bExpandableGrouping : true //group by first column
    });