Javascript JQuery DataTable pagenate不与asp repeater一起工作

Javascript JQuery DataTable pagenate不与asp repeater一起工作,javascript,jquery,css,asp.net,datatables,Javascript,Jquery,Css,Asp.net,Datatables,我有一个大约93列的简单数据表……但我的表标题中没有显示条目、排序图标或搜索框。我有我所有的专栏..不确定我是否遗漏了什么或者我的脚本加载顺序不正确 HTML <div class="dataTable_wrapper"> <div class="dataTables_wrapper form-inline dt-bootstrap no-footer"> <asp:Repeater id="repeater_Sales" runat="serv

我有一个大约93列的简单数据表……但我的表标题中没有显示条目、排序图标或搜索框。我有我所有的专栏..不确定我是否遗漏了什么或者我的脚本加载顺序不正确

HTML

<div class="dataTable_wrapper">
   <div class="dataTables_wrapper form-inline dt-bootstrap no-footer">
       <asp:Repeater id="repeater_Sales" runat="server">
         <HeaderTemplate>
            <table border="1" id="vSales" class="table table-striped table-bordered table-hover">
            <thead>
                <th>Customer</th>
                <th>Location</th>
                <th>POS</th>
                <th>Product</th>
                <th>QTY</th>
                <th>Sales</th>
                </thead>
            </HeaderTemplate>
            <ItemTemplate>
            <tr>
                <td><%#Container.DataItem("cus_desc")%></td>
                <td><%#Container.DataItem("loc_desc")%></td>
                <td><%#Container.DataItem("pos_desc")%></td>
                <td><%#Container.DataItem("pro_desc")%></td>
                <td><%#Container.DataItem("quantity_sold")%></td>
                <td><%#Container.DataItem("net_sales")%></td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
        </table>
        </FooterTemplate>
        </asp:Repeater>
    </div>
    </div>

初始化代码应为:

$('#vSales').DataTable({ 
   "paging": true,
   "searching": true,
   "info": true
});
但是,上面的代码可以简化为如下所示,因为您使用的值与默认值相同

$('#vSales').DataTable();

初始化代码应为:

$('#vSales').DataTable({ 
   "paging": true,
   "searching": true,
   "info": true
});
但是,上面的代码可以简化为如下所示,因为您使用的值与默认值相同

$('#vSales').DataTable();

检查生成的HTML。Datatables需要
thead
tbody
元素。请检查生成的HTML。数据表需要
thead
tbody
元素。
$('#vSales').DataTable();