-1
这是我的代码。ListView中的Jquery数据表不工作
输出是“表中没有可用数据”。我非常感谢并提前致谢。我试图把数据表放在listview的Layout模板中。
<table id="example" class="display">
<thead>
<tr>
all columns
</tr>
</thead>
<tfoot>
<tr>
all columns
</tr>
</tfoot>
<tbody>
<asp:ListView ID="lstfinance" runat="server">
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>Charde Marshall</td>
<td>Regional Director</td>
<td>San Francisco</td>
<td>36</td>
<td>2008/10/16</td>
<td>$470,600</td>
</tr>
</ItemTemplate>
</asp:ListView>
</tbody>
</table>
<script>
$(document).ready(function() {
$('#example').DataTable();
});
</script>
你有没有看着加载页面的原始HTML看看它是否正确,数据是否真的被推送到页面? – Bindrid
除了位于标签内的数据之外,所有内容都被加载。 –