Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.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数据表在';n';列数?_Jquery_Django_Datatables - Fatal编程技术网

如何使Jquery数据表在';n';列数?

如何使Jquery数据表在';n';列数?,jquery,django,datatables,Jquery,Django,Datatables,我正在制作Django网络应用程序。我用过这个。我的页面中有四个数据表。它们都在工作,但有一定数量的列,比如说6列。当我插入第7列时,搜索和分页从该表中消失。 我不知道这个问题是特定于数据表的,还是其他问题有问题 在下面给出的代码中,分页和搜索会消失,但当我删除最后一列和最后一列数据时,它会出现 <table id="confirmedDeliveries" class="ui celled table responsive nowrap unstacka

我正在制作Django网络应用程序。我用过这个。我的页面中有四个数据表。它们都在工作,但有一定数量的列,比如说6列。当我插入第7列时,搜索和分页从该表中消失。 我不知道这个问题是特定于数据表的,还是其他问题有问题

在下面给出的代码中,分页和搜索会消失,但当我删除最后一列和最后一列数据时,它会出现

  <table id="confirmedDeliveries" class="ui celled table responsive nowrap unstackable" style="width:100%">
                    <thead>
                        <tr>
                            <th>Requested By</th> 
                            <th>Contact</th>                            
                            <th>Date Requested</th>
                            <th>From</th>
                            <th>To</th>    
                            <th>Required Delivery Date</th> 
                            <th align="center" colspan="2">Action</th>    
                        </tr>
                    </thead>
                    <tbody  class="new_requests">
                        {% for delivery in confirmed %} 
                        <tr>
                            <td>{{delivery.request.user}}</td>  
                            <td>{{delivery.request.contact}}</td>                             
                            <td>{{delivery.request.date_requested}}</td>
                            <td>{{delivery.request.from_address}}</td>
                            <td>{{delivery.request.to_address}}</td>
                            <td>{{delivery.request.required_delivery_date}}</td>
                            <td><button class="btn btn-danger btn-sm" id="cancel_request" data-id="{{delivery.id}}">Cancel</button></td>
                            <td><button class="btn btn-info btn-sm" id="done_request" data-id="{{delivery.id}}">Delivered</button></td>

                        </tr>
                        {% endfor %}
                    </tbody>
                </table>

请求
接触
要求的日期
从…起
到
要求的交货日期
行动
{在已确认的%中交付的%}
{{delivery.request.user}
{{delivery.request.contact}
{{delivery.request.date_request}
{{delivery.request.from_address}}
{{delivery.request.to_address}}
{{delivery.request.required{u delivery{u date}
取消
交付
{%endfor%}

任何洞察都是值得欣赏的。

尝试删除您的
colspan=“2”
-因此,只需使用以下命令:
操作

如果要使用colspans和rowspans,请参见